Skip to content

Commit

Permalink
Merge branch 'gh-pages' of https://github.com/PrismJS/prism
Browse files Browse the repository at this point in the history
  • Loading branch information
Golmote committed Jul 26, 2015
2 parents 58f6fe1 + ed9d7e3 commit 0c24b9b
Show file tree
Hide file tree
Showing 75 changed files with 1,123 additions and 219 deletions.
5 changes: 4 additions & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"name": "prism",
"version": "0.0.1",
"main": [
"prism.js",
"themes/prism.css"
Expand All @@ -9,6 +8,10 @@
"authors": "Lea Verou",
"description": "Lightweight, robust, elegant syntax highlighting. A spin-off project from Dabblet.",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/PrismJS/prism.git"
},
"ignore": [
"**/.*",
"img",
Expand Down
20 changes: 20 additions & 0 deletions components.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@ var components = {
"require": "clike",
"owner": "zeitgeist87"
},
"brainfuck": {
"title": "Brainfuck",
"owner": "Golmote"
},
"c": {
"title": "C",
"require": "clike",
Expand Down Expand Up @@ -185,6 +189,10 @@ var components = {
"title": "Julia",
"owner": "cdagnino"
},
"keyman": {
"title": "Keyman",
"owner": "mcdurdin"
},
"latex": {
"title": "LaTeX",
"owner": "japborst"
Expand All @@ -198,6 +206,10 @@ var components = {
"title": "LOLCODE",
"owner": "Golmote"
},
"makefile": {
"title": "Makefile",
"owner": "Golmote"
},
"markdown": {
"title": "Markdown",
"require": "markup",
Expand Down Expand Up @@ -276,6 +288,10 @@ var components = {
"title": "SAS",
"owner": "Golmote"
},
"sass": {
"title": "Sass (Sass)",
"owner": "Golmote"
},
"scss": {
"title": "Sass (Scss)",
"require": "css",
Expand Down Expand Up @@ -322,6 +338,10 @@ var components = {
"require": "javascript",
"owner": "vkbansal"
},
"vhdl": {
"title": "VHDL",
"owner": "a-rey"
},
"wiki": {
"title": "Wiki markup",
"require": "markup",
Expand Down
11 changes: 4 additions & 7 deletions components/prism-actionscript.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
/* TODO
Fix XML highlighting
*/

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|native|override|set|static)\b/,
'operator': /(?:[+\-*\/%^]|&&?|\|\|?|<<?|>>?>?|[!=]=)=?|[=~?@]/
'operator': /\+\+|--|(?:[+\-*\/%^]|&&?|\|\|?|<<?|>>?>?|[!=]=?)=?|[~?@]/
});
Prism.languages.actionscript['class-name'].alias = 'function';

if (Prism.languages.markup) {
Prism.languages.insertBefore('actionscript', 'operator', {
Prism.languages.insertBefore('actionscript', 'string', {
'xml': {
pattern: /(^|[^.])<[\s\S]*>(?=\s*($|[\r\n,.;\]})<]))/,
pattern: /(^|[^.])<\/?\w+(?:\s+[^\s>\/=]+=("|')(?:\\\1|\\?(?!\1)[\w\W])*\2)*\s*\/?>/,
lookbehind: true,
inside: {
rest: Prism.languages.markup
}
Expand Down
2 changes: 1 addition & 1 deletion components/prism-actionscript.min.js

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

3 changes: 2 additions & 1 deletion components/prism-apacheconf.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion components/prism-apacheconf.min.js

Large diffs are not rendered by default.

11 changes: 4 additions & 7 deletions components/prism-applescript.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,20 @@
/* TODO
Add support for nested block comments...
*/

Prism.languages.applescript = {
'comment': [
/\(\*[\w\W]*?\*\)/,
// Allow one level of nesting
/\(\*(?:\(\*[\w\W]*?\*\)|[\w\W])*?\*\)/,
/--.+/,
/#.+/
],
'string': /"(?:\\?.)*?"/,
'number': /\b-?\d*\.?\d+([Ee]-?\d+)?\b/,
'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|and|apart from|around|as|aside from|at|back|before|beginning|behind|below|beneath|beside|between|but|by|considering|contain|contains|continue|copy|div|does|eighth|else|end|equal|equals|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|mod|my|ninth|not|of|on|onto|or|out of|over|prop|property|put|ref|reference|repeat|return|returning|script|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/,
'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'
},
'number': /\b-?\d*\.?\d+([Ee]-?\d+)?\b/,
'punctuation': /[{}():,¬«»]/
};
2 changes: 1 addition & 1 deletion components/prism-applescript.min.js

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

Loading

0 comments on commit 0c24b9b

Please sign in to comment.