Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1150)

Side by Side Diff: lib/src/prism/components/prism-inform7.js

Issue 1418513006: update elements and fix some bugs (Closed) Base URL: git@github.com:dart-lang/polymer_elements.git@master
Patch Set: code review updates Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 Prism.languages.inform7 = {
2 'string': {
3 pattern: /"[^"]*"/,
4 inside: {
5 'substitution': {
6 pattern: /\[[^\]]+\]/,
7 inside: {
8 'delimiter': {
9 pattern:/\[|\]/,
10 alias: 'punctuation'
11 }
12 // See rest below
13 }
14 }
15 }
16 },
17 'comment': /\[[^\]]+\]/,
18 'title': {
19 pattern: /^[ \t]*(?:volume|book|part(?! of)|chapter|section|tabl e)\b.+/im,
20 alias: 'important'
21 },
22 'number': {
23 pattern: /(^|[^-])(?:(?:\b|-)\d+(?:\.\d+)?(?:\^\d+)?\w*|\b(?:one |two|three|four|five|six|seven|eight|nine|ten|eleven|twelve))\b(?!-)/i,
24 lookbehind: true
25 },
26 'verb': {
27 pattern: /(^|[^-])\b(?:applying to|are|attacking|answering|askin g|be(?:ing)?|burning|buying|called|carries|carry(?! out)|carrying|climbing|closi ng|conceal(?:s|ing)?|consulting|contain(?:s|ing)?|cutting|drinking|dropping|eati ng|enclos(?:es?|ing)|entering|examining|exiting|getting|giving|going|ha(?:ve|s|v ing)|hold(?:s|ing)?|impl(?:y|ies)|incorporat(?:es?|ing)|inserting|is|jumping|kis sing|listening|locking|looking|mean(?:s|ing)?|opening|provid(?:es?|ing)|pulling| pushing|putting|relat(?:es?|ing)|removing|searching|see(?:s|ing)?|setting|showin g|singing|sleeping|smelling|squeezing|switching|support(?:s|ing)?|swearing|takin g|tasting|telling|thinking|throwing|touching|turning|tying|unlock(?:s|ing)?|var( ?:y|ies|ying)|waiting|waking|waving|wear(?:s|ing)?)\b(?!-)/i,
28 lookbehind: true,
29 alias: 'operator'
30 },
31 'keyword': {
32 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 s tory|rule for|running through|say(?:ing)?|stop the action|test|try(?:ing)?|under stand|unless|use|when|while|yes)\b(?!-)/i,
33 lookbehind: true
34 },
35 'property': {
36 pattern: /(^|[^-])\b(?:adjacent(?! to)|carried|closed|concealed| contained|dark|described|edible|empty|enclosed|enterable|even|female|fixed in pl ace|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|privatel y-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|unlocke d|unmarked for listing|unmentioned|unopenable|untouchable|unvisited|variable|vis ible|visited|wearable|worn)\b(?!-)/i,
37 lookbehind: true,
38 alias: 'symbol'
39 },
40 'position': {
41 pattern: /(^|[^-])\b(?:above|adjacent to|back side of|below|betw een|down|east|everywhere|front side|here|in|inside(?: from)?|north(?:east|west)? |nowhere|on(?: top of)?|other side|outside(?: from)?|parts? of|regionally in|sou th(?:east|west)?|through|up|west|within)\b(?!-)/i,
42 lookbehind: true,
43 alias: 'keyword'
44 },
45 'type': {
46 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,
47 lookbehind: true,
48 alias: 'variable'
49 },
50 'punctuation': /[.,:;(){}]/
51 };
52
53 Prism.languages.inform7['string'].inside['substitution'].inside.rest = Prism.uti l.clone(Prism.languages.inform7);
54 // We don't want the remaining text in the substitution to be highlighted as the string.
55 Prism.languages.inform7['string'].inside['substitution'].inside.rest.text = {
56 pattern: /\S(?:\s*\S)*/,
57 alias: 'comment'
58 };
OLDNEW
« no previous file with comments | « lib/src/prism/components/prism-http.min.js ('k') | lib/src/prism/components/prism-inform7.min.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698