From 31aede445d1d4a202e6ba2ac5b4bae9d10c95f5c Mon Sep 17 00:00:00 2001 From: Ryan Griffith Date: Fri, 5 Apr 2013 14:45:22 -0400 Subject: [PATCH] Added velocity mode and sample doc to demo --- demo/kitchen-sink/doclist.js | 1 + demo/kitchen-sink/docs/velocity.vm | 44 ++++++++++++++++++++++++++++++ demo/kitchen-sink/modelist.js | 3 +- 3 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 demo/kitchen-sink/docs/velocity.vm diff --git a/demo/kitchen-sink/doclist.js b/demo/kitchen-sink/doclist.js index e4f4833b..7e3feb47 100644 --- a/demo/kitchen-sink/doclist.js +++ b/demo/kitchen-sink/doclist.js @@ -132,6 +132,7 @@ var docs = { "docs/toml.toml": "TOML", "docs/typescript.ts": "Typescript", "docs/vbscript.vbs": "VBScript", + "docs/velocity.vm": "Velocity", "docs/xml.xml": "XML", "docs/xquery.xq": "XQuery", "docs/yaml.yaml": "YAML", diff --git a/demo/kitchen-sink/docs/velocity.vm b/demo/kitchen-sink/docs/velocity.vm new file mode 100644 index 00000000..9156020b --- /dev/null +++ b/demo/kitchen-sink/docs/velocity.vm @@ -0,0 +1,44 @@ +#* + This is a sample comment block that + spans multiple lines. +*# + +#macro ( outputItem $item ) +
  • ${item}
  • +#end + +## Define the items to iterate +#set ( $items = [1, 2, 3, 4] ) + + + + + + \ No newline at end of file diff --git a/demo/kitchen-sink/modelist.js b/demo/kitchen-sink/modelist.js index 9c693f99..4611e406 100644 --- a/demo/kitchen-sink/modelist.js +++ b/demo/kitchen-sink/modelist.js @@ -25,7 +25,7 @@ var Mode = function(name, desc, extensions) { }) + "$"; } else { var re = "^.*\\.(" + extensions + ")$"; - } + } this.extRe = new RegExp(re, "gi"); }; @@ -103,6 +103,7 @@ var modesByName = { toml: ["toml" , "toml"], typescript: ["Typescript" , "typescript|ts|str"], vbscript: ["VBScript" , "vbs"], + velocity: ["Velocity" , "vm"], xml: ["XML" , "xml|rdf|rss|wsdl|xslt|atom|mathml|mml|xul|xbl"], xquery: ["XQuery" , "xq"], yaml: ["YAML" , "yaml"]