Add support for Velocity. Fix #1372 (#1378)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827
diff --git a/components.js b/components.js
index 8858f0f..45af69a 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"},"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"},"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"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"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","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"},"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"},"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"},"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 c276ef6..b05fb23 100644
--- a/components.json
+++ b/components.json
@@ -658,6 +658,11 @@
"require": "basic",
"owner": "Bigsby"
},
+ "velocity": {
+ "title": "Velocity",
+ "require": "markup",
+ "owner": "Golmote"
+ },
"verilog": {
"title": "Verilog",
"owner": "a-rey"
diff --git a/components/prism-velocity.js b/components/prism-velocity.js
new file mode 100644
index 0000000..d2bbe05
--- /dev/null
+++ b/components/prism-velocity.js
@@ -0,0 +1,72 @@
+(function (Prism) {
+ Prism.languages.velocity = Prism.languages.extend('markup', {});
+
+ var velocity = {
+ 'variable': {
+ pattern: /(^|[^\\](?:\\\\)*)\$!?(?:[a-z][\w-]*(?:\([^)]*\))?(?:\.[a-z][\w-]*(?:\([^)]*\))?|\[[^\]]+])*|{[^}]+})/i,
+ lookbehind: true,
+ inside: {} // See below
+ },
+ 'string': {
+ pattern: /"[^"]*"|'[^']*'/,
+ greedy: true
+ },
+ 'number': /\b\d+\b/,
+ 'boolean': /\b(?:true|false)\b/,
+ 'operator': /[=!<>]=?|[+*/%-]|&&|\|\||\.\.|\b(?:eq|g[et]|l[et]|n(?:e|ot))\b/,
+ 'punctuation': /[(){}[\]:,.]/
+ };
+
+ velocity.variable.inside = {
+ 'string': velocity['string'],
+ 'function': {
+ pattern: /([^\w-])[a-z][\w-]*(?=\()/,
+ lookbehind: true
+ },
+ 'number': velocity['number'],
+ 'boolean': velocity['boolean'],
+ 'punctuation': velocity['punctuation']
+ };
+
+ Prism.languages.insertBefore('velocity', 'comment', {
+ 'unparsed': {
+ pattern: /(^|[^\\])#\[\[[\s\S]*?]]#/,
+ lookbehind: true,
+ greedy: true,
+ inside: {
+ 'punctuation': /^#\[\[|]]#$/
+ }
+ },
+ 'velocity-comment': [
+ {
+ pattern: /(^|[^\\])#\*[\s\S]*?\*#/,
+ lookbehind: true,
+ greedy: true,
+ alias: 'comment'
+ },
+ {
+ pattern: /(^|[^\\])##.*/,
+ lookbehind: true,
+ greedy: true,
+ alias: 'comment'
+ }
+ ],
+ 'directive': {
+ pattern: /(^|[^\\](?:\\\\)*)#@?(?:[a-z][\w-]*|{[a-z][\w-]*})(?:\s*\((?:[^()]|\([^()]*\))*\))?/i,
+ lookbehind: true,
+ inside: {
+ keyword: {
+ pattern: /^#@?(?:[a-z][\w-]*|{[a-z][\w-]*})|\bin\b/,
+ inside: {
+ 'punctuation': /[{}]/
+ }
+ },
+ rest: velocity
+ }
+ },
+ 'variable': velocity['variable']
+ });
+
+ Prism.languages.velocity['tag'].inside['attr-value'].inside.rest = Prism.languages.velocity;
+
+}(Prism));
\ No newline at end of file
diff --git a/components/prism-velocity.min.js b/components/prism-velocity.min.js
new file mode 100644
index 0000000..d0c1c07
--- /dev/null
+++ b/components/prism-velocity.min.js
@@ -0,0 +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
diff --git a/examples/prism-velocity.html b/examples/prism-velocity.html
new file mode 100644
index 0000000..a97fa05
--- /dev/null
+++ b/examples/prism-velocity.html
@@ -0,0 +1,47 @@
+<h2>Comments</h2>
+<pre><code>## Single line comment
+#* Multi-line
+comment *#</code></pre>
+
+<h2>Unparsed sections</h2>
+<pre><code>## Section below is not parsed
+#[[
+ ## This is not a comment
+]]#</code></pre>
+
+<h2>Variables</h2>
+<pre><code>$mud
+$customer.Name
+$flogger.getPromo( $mud )
+$!{mudSlinger_9}
+$foo[0]
+$foo[$i]
+$foo["bar"]
+$foo.bar[1].junk
+$foo.callMethod()[1]</code></pre>
+
+<h2>Directives</h2>
+<pre><code>#set($foo.bar[1] = 3)
+#if($a==1)true enough#{else}no way!#end
+#macro( d )
+<tr><td>$!bodyContent</td></tr>
+#end
+#@d()Hello!#end</code></pre>
+
+<h2>Integration with HTML</h2>
+<pre><code><html>
+ <body>
+ Hello $customer.Name!
+ <table>
+ #foreach( $mud in $mudsOnSpecial )
+ #if ( $customer.hasPurchased($mud) )
+ <tr>
+ <td>
+ $flogger.getPromo( $mud )
+ </td>
+ </tr>
+ #end
+ #end
+ </table>
+ </body>
+</html></code></pre>
\ No newline at end of file
diff --git a/plugins/autoloader/prism-autoloader.js b/plugins/autoloader/prism-autoloader.js
index a8765da..9648a24 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","swift":"clike","textile":"markup","twig":"markup","typescript":"javascript","vbnet":"basic","wiki":"markup","xeora":"markup"}/*]*/;
+ 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","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 9aa920f..d74f147 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",swift:"clike",textile:"markup",twig:"markup",typescript:"javascript",vbnet:"basic",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",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",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
diff --git a/tests/languages/velocity/directive_feature.test b/tests/languages/velocity/directive_feature.test
new file mode 100644
index 0000000..463722e
--- /dev/null
+++ b/tests/languages/velocity/directive_feature.test
@@ -0,0 +1,417 @@
+#foreach($mud in $mudsOnSpecial)
+#if($customer.hasPurchased($mud))
+#set($a = "Velocity")
+#set($foo.bar[1] = 3)
+#{set}($map["apple"] = "orange")
+#if($foo == $bar)#end
+#if (!$foo)#end
+#if ($foo && $foo.bar)#end
+#{if}($foo1 || $foo2)#end
+#set( $monkey.Say = ["Not", $my, "fault"] )
+#set( $monkey.Map = {"banana" : "good", "roast beef" : "bad"})
+#set( $result = $query.criteria("address") )
+#set( $result = true )
+#set( $result = false )
+#if( $foo < 10 )
+#elseif( $foo == 10 )
+#else
+#end
+#if( $foo == $bar)it's true!#{else}it's not!#end
+#include( "greetings.txt", $seasonalstock )
+#parse( "me.vm" )
+#{parse}( "me.vm" )
+#break
+#{break}
+#break($macro.topmost)
+#stop('$foo was not in context')
+#{stop}
+#evaluate($dynamicsource)
+#macro( d )
+<tr><td></td></tr>
+#end
+#d()
+#@d()Hello!#end
+\#include( "a.txt" )
+\\#include ( "a.txt" )
+#set($foo=["$10 and ","a pie"])#foreach($a in $foo)$a#end
+#set( $foo = $bar + 3 )
+#set( $foo = $bar - 4 )
+#set( $foo = $bar * 6 )
+#set( $foo = $bar / 2 )
+#set( $foo = $bar % 5 )
+#foreach( $foo in [1..5] )
+
+----------------------------------------------------
+
+[
+ ["directive", [
+ ["keyword", ["#foreach"]],
+ ["punctuation", "("],
+ ["variable", ["$mud"]],
+ ["keyword", ["in"]],
+ ["variable", ["$mudsOnSpecial"]],
+ ["punctuation", ")"]
+ ]],
+ ["directive", [
+ ["keyword", ["#if"]],
+ ["punctuation", "("],
+ ["variable", [
+ "$customer",
+ ["punctuation", "."],
+ ["function", "hasPurchased"],
+ ["punctuation", "("],
+ "$mud",
+ ["punctuation", ")"]
+ ]],
+ ["punctuation", ")"]
+ ]],
+ ["directive", [
+ ["keyword", ["#set"]],
+ ["punctuation", "("],
+ ["variable", ["$a"]],
+ ["operator", "="],
+ ["string", "\"Velocity\""],
+ ["punctuation", ")"]
+ ]],
+ ["directive", [
+ ["keyword", ["#set"]],
+ ["punctuation", "("],
+ ["variable", [
+ "$foo",
+ ["punctuation", "."],
+ "bar",
+ ["punctuation", "["],
+ ["number", "1"],
+ ["punctuation", "]"]
+ ]],
+ ["operator", "="],
+ ["number", "3"],
+ ["punctuation", ")"]
+ ]],
+ ["directive", [
+ ["keyword", ["#", ["punctuation", "{"], "set", ["punctuation", "}"]]],
+ ["punctuation", "("],
+ ["variable", [
+ "$map",
+ ["punctuation", "["],
+ ["string", "\"apple\""],
+ ["punctuation", "]"]
+ ]],
+ ["operator", "="],
+ ["string", "\"orange\""],
+ ["punctuation", ")"]
+ ]],
+ ["directive", [
+ ["keyword", ["#if"]],
+ ["punctuation", "("],
+ ["variable", ["$foo"]],
+ ["operator", "=="],
+ ["variable", ["$bar"]],
+ ["punctuation", ")"]
+ ]],
+ ["directive", [
+ ["keyword", ["#end"]]
+ ]],
+ ["directive", [
+ ["keyword", ["#if"]],
+ ["punctuation", "("],
+ ["operator", "!"],
+ ["variable", ["$foo"]],
+ ["punctuation", ")"]
+ ]],
+ ["directive", [
+ ["keyword", ["#end"]]
+ ]],
+ ["directive", [
+ ["keyword", ["#if"]],
+ ["punctuation", "("],
+ ["variable", ["$foo"]],
+ ["operator", "&&"],
+ ["variable", ["$foo", ["punctuation", "."], "bar"]],
+ ["punctuation", ")"]
+ ]],
+ ["directive", [
+ ["keyword", ["#end"]]
+ ]],
+ ["directive", [
+ ["keyword", ["#", ["punctuation", "{"], "if", ["punctuation", "}"]]],
+ ["punctuation", "("],
+ ["variable", ["$foo1"]],
+ ["operator", "||"],
+ ["variable", ["$foo2"]],
+ ["punctuation", ")"]
+ ]],
+ ["directive", [
+ ["keyword", ["#end"]]
+ ]],
+ ["directive", [
+ ["keyword", ["#set"]],
+ ["punctuation", "("],
+ ["variable", ["$monkey", ["punctuation", "."], "Say"]],
+ ["operator", "="],
+ ["punctuation", "["],
+ ["string", "\"Not\""],
+ ["punctuation", ","],
+ ["variable", ["$my"]],
+ ["punctuation", ","],
+ ["string", "\"fault\""],
+ ["punctuation", "]"],
+ ["punctuation", ")"]
+ ]],
+ ["directive", [
+ ["keyword", ["#set"]],
+ ["punctuation", "("],
+ ["variable", ["$monkey", ["punctuation", "."], "Map"]],
+ ["operator", "="],
+ ["punctuation", "{"],
+ ["string", "\"banana\""],
+ ["punctuation", ":"],
+ ["string", "\"good\""],
+ ["punctuation", ","],
+ ["string", "\"roast beef\""],
+ ["punctuation", ":"],
+ ["string", "\"bad\""],
+ ["punctuation", "}"],
+ ["punctuation", ")"]
+ ]],
+ ["directive", [
+ ["keyword", ["#set"]],
+ ["punctuation", "("],
+ ["variable", ["$result"]],
+ ["operator", "="],
+ ["variable", [
+ "$query",
+ ["punctuation", "."],
+ ["function", "criteria"],
+ ["punctuation", "("],
+ ["string", "\"address\""],
+ ["punctuation", ")"]
+ ]],
+ ["punctuation", ")"]
+ ]],
+ ["directive", [
+ ["keyword", ["#set"]],
+ ["punctuation", "("],
+ ["variable", ["$result"]],
+ ["operator", "="],
+ ["boolean", "true"],
+ ["punctuation", ")"]
+ ]],
+ ["directive", [
+ ["keyword", ["#set"]],
+ ["punctuation", "("],
+ ["variable", ["$result"]],
+ ["operator", "="],
+ ["boolean", "false"],
+ ["punctuation", ")"]
+ ]],
+ ["directive", [
+ ["keyword", ["#if"]],
+ ["punctuation", "("],
+ ["variable", ["$foo"]],
+ ["operator", "<"],
+ ["number", "10"],
+ ["punctuation", ")"]
+ ]],
+ ["directive", [
+ ["keyword", ["#elseif"]],
+ ["punctuation", "("],
+ ["variable", ["$foo"]],
+ ["operator", "=="],
+ ["number", "10"],
+ ["punctuation", ")"]
+ ]],
+ ["directive", [
+ ["keyword", ["#else"]]
+ ]],
+ ["directive", [
+ ["keyword", ["#end"]]
+ ]],
+ ["directive", [
+ ["keyword", ["#if"]],
+ ["punctuation", "("],
+ ["variable", ["$foo"]],
+ ["operator", "=="],
+ ["variable", ["$bar"]],
+ ["punctuation", ")"]
+ ]],
+ "it's true!",
+ ["directive", [
+ ["keyword", ["#", ["punctuation", "{"], "else", ["punctuation", "}"]]]
+ ]],
+ "it's not!",
+ ["directive", [
+ ["keyword", ["#end"]]
+ ]],
+ ["directive", [
+ ["keyword", ["#include"]],
+ ["punctuation", "("],
+ ["string", "\"greetings.txt\""],
+ ["punctuation", ","],
+ ["variable", ["$seasonalstock"]],
+ ["punctuation", ")"]
+ ]],
+ ["directive", [
+ ["keyword", ["#parse"]],
+ ["punctuation", "("],
+ ["string", "\"me.vm\""],
+ ["punctuation", ")"]
+ ]],
+ ["directive", [
+ ["keyword", ["#", ["punctuation", "{"], "parse", ["punctuation", "}"]]],
+ ["punctuation", "("],
+ ["string", "\"me.vm\""],
+ ["punctuation", ")"]
+ ]],
+ ["directive", [
+ ["keyword", ["#break"]]
+ ]],
+ ["directive", [
+ ["keyword", ["#", ["punctuation", "{"], "break", ["punctuation", "}"]]]
+ ]],
+ ["directive", [
+ ["keyword", ["#break"]],
+ ["punctuation", "("],
+ ["variable", ["$macro", ["punctuation", "."], "topmost"]],
+ ["punctuation", ")"]
+ ]],
+ ["directive", [
+ ["keyword", ["#stop"]],
+ ["punctuation", "("],
+ ["string", "'$foo was not in context'"],
+ ["punctuation", ")"]
+ ]],
+ ["directive", [
+ ["keyword", ["#", ["punctuation", "{"], "stop", ["punctuation", "}"]]]
+ ]],
+ ["directive", [
+ ["keyword", ["#evaluate"]],
+ ["punctuation", "("],
+ ["variable", ["$dynamicsource"]],
+ ["punctuation", ")"]
+ ]],
+ ["directive", [
+ ["keyword", ["#macro"]],
+ ["punctuation", "("],
+ " d ",
+ ["punctuation", ")"]
+ ]],
+ ["tag", [["tag", [["punctuation", "<"], "tr"]], ["punctuation", ">"]]],
+ ["tag", [["tag", [["punctuation", "<"], "td"]], ["punctuation", ">"]]],
+ ["tag", [["tag", [["punctuation", "</"], "td"]], ["punctuation", ">"]]],
+ ["tag", [["tag", [["punctuation", "</"], "tr"]], ["punctuation", ">"]]],
+ ["directive", [
+ ["keyword", ["#end"]]
+ ]],
+ ["directive", [
+ ["keyword", ["#d"]],
+ ["punctuation", "("],
+ ["punctuation", ")"]
+ ]],
+ ["directive", [
+ ["keyword", ["#@d"]],
+ ["punctuation", "("],
+ ["punctuation", ")"]
+ ]],
+ "Hello!",
+ ["directive", [
+ ["keyword", ["#end"]]
+ ]],
+ "\r\n\\#include( \"a.txt\" )\r\n\\\\",
+ ["directive", [
+ ["keyword", ["#include"]],
+ ["punctuation", "("],
+ ["string", "\"a.txt\""],
+ ["punctuation", ")"]
+ ]],
+ ["directive", [
+ ["keyword", ["#set"]],
+ ["punctuation", "("],
+ ["variable", ["$foo"]],
+ ["operator", "="],
+ ["punctuation", "["],
+ ["string", "\"$10 and \""],
+ ["punctuation", ","],
+ ["string", "\"a pie\""],
+ ["punctuation", "]"],
+ ["punctuation", ")"]
+ ]],
+ ["directive", [
+ ["keyword", ["#foreach"]],
+ ["punctuation", "("],
+ ["variable", ["$a"]],
+ ["keyword", ["in"]],
+ ["variable", ["$foo"]],
+ ["punctuation", ")"]
+ ]],
+ ["variable", ["$a"]],
+ ["directive", [
+ ["keyword", ["#end"]]
+ ]],
+ ["directive", [
+ ["keyword", ["#set"]],
+ ["punctuation", "("],
+ ["variable", ["$foo"]],
+ ["operator", "="],
+ ["variable", ["$bar"]],
+ ["operator", "+"],
+ ["number", "3"],
+ ["punctuation", ")"]
+ ]],
+ ["directive", [
+ ["keyword", ["#set"]],
+ ["punctuation", "("],
+ ["variable", ["$foo"]],
+ ["operator", "="],
+ ["variable", ["$bar"]],
+ ["operator", "-"],
+ ["number", "4"],
+ ["punctuation", ")"]
+ ]],
+ ["directive", [
+ ["keyword", ["#set"]],
+ ["punctuation", "("],
+ ["variable", ["$foo"]],
+ ["operator", "="],
+ ["variable", ["$bar"]],
+ ["operator", "*"],
+ ["number", "6"],
+ ["punctuation", ")"]
+ ]],
+ ["directive", [
+ ["keyword", ["#set"]],
+ ["punctuation", "("],
+ ["variable", ["$foo"]],
+ ["operator", "="],
+ ["variable", ["$bar"]],
+ ["operator", "/"],
+ ["number", "2"],
+ ["punctuation", ")"]
+ ]],
+ ["directive", [
+ ["keyword", ["#set"]],
+ ["punctuation", "("],
+ ["variable", ["$foo"]],
+ ["operator", "="],
+ ["variable", ["$bar"]],
+ ["operator", "%"],
+ ["number", "5"],
+ ["punctuation", ")"]
+ ]],
+ ["directive", [
+ ["keyword", ["#foreach"]],
+ ["punctuation", "("],
+ ["variable", ["$foo"]],
+ ["keyword", ["in"]],
+ ["punctuation", "["],
+ ["number", "1"],
+ ["operator", ".."],
+ ["number", "5"],
+ ["punctuation", "]"],
+ ["punctuation", ")"]
+ ]]
+]
+
+----------------------------------------------------
+
+Checks for directives.
\ No newline at end of file
diff --git a/tests/languages/velocity/unparsed_feature.test b/tests/languages/velocity/unparsed_feature.test
new file mode 100644
index 0000000..32dc1f5
--- /dev/null
+++ b/tests/languages/velocity/unparsed_feature.test
@@ -0,0 +1,29 @@
+#[[]]#
+#[[This is not parsed]]#
+#[[#if("some quotes" 'some quotes')
+## #* *#
+$dollar
+]]#
+
+----------------------------------------------------
+
+[
+ ["unparsed", [
+ ["punctuation", "#[["],
+ ["punctuation", "]]#"]
+ ]],
+ ["unparsed", [
+ ["punctuation", "#[["],
+ "This is not parsed",
+ ["punctuation", "]]#"]
+ ]],
+ ["unparsed", [
+ ["punctuation", "#[["],
+ "#if(\"some quotes\" 'some quotes')\r\n## #* *#\r\n$dollar\r\n",
+ ["punctuation", "]]#"]
+ ]]
+]
+
+----------------------------------------------------
+
+Checks for unparsed sections.
\ No newline at end of file
diff --git a/tests/languages/velocity/variable_feature.test b/tests/languages/velocity/variable_feature.test
new file mode 100644
index 0000000..fcff8cc
--- /dev/null
+++ b/tests/languages/velocity/variable_feature.test
@@ -0,0 +1,147 @@
+$mud
+$customer.Name
+$flogger.getPromo( $mud )
+$mud-slinger
+$mud_slinger
+$mudSlinger1
+$!mudSlinger_9
+$person.setAttributes( ["Strange", false, "Excited"] )
+$foo[0]
+$foo[$i]
+$foo["bar"]
+$foo.bar[1].junk
+$foo.callMethod()[1]
+$foo["apple"][4]
+${mudSlinger}
+$!{mudSlinger_9}
+${customer.Address}
+${purchase.getTotal()}
+<input value="$email"/>
+<input value="$!{email}"/>
+$\!foo
+$\!{foo}
+$\\!foo
+$\\\!foo
+\$foo
+\$!foo
+\$!{foo}
+\\$!{foo}
+
+----------------------------------------------------
+
+[
+ ["variable", ["$mud"]],
+ ["variable", ["$customer", ["punctuation", "."], "Name"]],
+ ["variable", [
+ "$flogger",
+ ["punctuation", "."],
+ ["function", "getPromo"],
+ ["punctuation", "("],
+ " $mud ",
+ ["punctuation", ")"]
+ ]],
+ ["variable", ["$mud-slinger"]],
+ ["variable", ["$mud_slinger"]],
+ ["variable", ["$mudSlinger1"]],
+ ["variable", ["$!mudSlinger_9"]],
+ ["variable", [
+ "$person",
+ ["punctuation", "."],
+ ["function", "setAttributes"],
+ ["punctuation", "("],
+ ["punctuation", "["],
+ ["string", "\"Strange\""],
+ ["punctuation", ","],
+ ["boolean", "false"],
+ ["punctuation", ","],
+ ["string", "\"Excited\""],
+ ["punctuation", "]"],
+ ["punctuation", ")"]
+ ]],
+ ["variable", ["$foo", ["punctuation", "["], ["number", "0"], ["punctuation", "]"]]],
+ ["variable", ["$foo", ["punctuation", "["], "$i", ["punctuation", "]"]]],
+ ["variable", ["$foo", ["punctuation", "["], ["string", "\"bar\""], ["punctuation", "]"]]],
+ ["variable", [
+ "$foo",
+ ["punctuation", "."],
+ "bar",
+ ["punctuation", "["],
+ ["number", "1"],
+ ["punctuation", "]"],
+ ["punctuation", "."],
+ "junk"
+ ]],
+ ["variable", [
+ "$foo",
+ ["punctuation", "."],
+ ["function", "callMethod"],
+ ["punctuation", "("],
+ ["punctuation", ")"],
+ ["punctuation", "["],
+ ["number", "1"],
+ ["punctuation", "]"]
+ ]],
+ ["variable", [
+ "$foo",
+ ["punctuation", "["],
+ ["string", "\"apple\""],
+ ["punctuation", "]"],
+ ["punctuation", "["],
+ ["number", "4"],
+ ["punctuation", "]"]
+ ]],
+ ["variable", ["$", ["punctuation", "{"], "mudSlinger", ["punctuation", "}"]]],
+ ["variable", ["$!", ["punctuation", "{"], "mudSlinger_9", ["punctuation", "}"]]],
+ ["variable", [
+ "$",
+ ["punctuation", "{"],
+ "customer",
+ ["punctuation", "."],
+ "Address",
+ ["punctuation", "}"]
+ ]],
+ ["variable", [
+ "$",
+ ["punctuation", "{"],
+ "purchase",
+ ["punctuation", "."],
+ ["function", "getTotal"],
+ ["punctuation", "("],
+ ["punctuation", ")"],
+ ["punctuation", "}"]
+ ]],
+ ["tag", [
+ ["tag", [
+ ["punctuation", "<"],
+ "input"
+ ]],
+ ["attr-name", ["value"]],
+ ["attr-value", [
+ ["punctuation", "="],
+ ["punctuation", "\""],
+ ["variable", ["$email"]],
+ ["punctuation", "\""]
+ ]],
+ ["punctuation", "/>"]
+ ]],
+ ["tag", [
+ ["tag", [
+ ["punctuation", "<"],
+ "input"
+ ]],
+ ["attr-name", ["value"]],
+ ["attr-value", [
+ ["punctuation", "="],
+ ["punctuation", "\""],
+ ["variable", ["$!", ["punctuation", "{"], "email", ["punctuation", "}"]]],
+ ["punctuation", "\""]
+ ]],
+ ["punctuation", "/>"]
+ ]],
+ "\r\n$\\!foo\r\n$\\!{foo}\r\n$\\\\!foo\r\n$\\\\\\!foo\r\n\\$foo\r\n\\$!foo\r\n\\$!{foo}\r\n\\\\",
+ ["variable", ["$!", ["punctuation", "{"], "foo", ["punctuation", "}"]]]
+]
+
+----------------------------------------------------
+
+Checks for variables.
\ No newline at end of file
diff --git a/tests/languages/velocity/velocity-comment_feature.test b/tests/languages/velocity/velocity-comment_feature.test
new file mode 100644
index 0000000..0b66639
--- /dev/null
+++ b/tests/languages/velocity/velocity-comment_feature.test
@@ -0,0 +1,18 @@
+#**#
+#*Multiline <div>
+comment*#
+##
+## Single line comment <div>
+
+----------------------------------------------------
+
+[
+ ["velocity-comment", "#**#"],
+ ["velocity-comment", "#*Multiline <div>\r\ncomment*#"],
+ ["velocity-comment", "##"],
+ ["velocity-comment", "## Single line comment <div>"]
+]
+
+----------------------------------------------------
+
+Checks for comments.
\ No newline at end of file