diff options
| author | Christian Hammond <christian@beanbaginc.com> | 2016-11-04 16:57:38 -0700 |
|---|---|---|
| committer | Christian Hammond <christian@beanbaginc.com> | 2016-11-04 16:57:38 -0700 |
| commit | 6ded9db39463372e5205a36bea72d6de516ece69 (patch) | |
| tree | 1d1f497cc99dd44d2ee7e2c3daa35965157ff924 /tests/examplefiles/example.msc | |
| download | pygments-git-6ded9db39463372e5205a36bea72d6de516ece69.tar.gz | |
Add support for partials and path segments for Handlebars.
This introduces support for some missing features to the Handlebars lexer:
Partials and path segments. Partials mostly appeared to work before, but the
`>` in `{{> ... }}` would appear as a syntax error, as could other
components of the partial. This change introduces support for:
* Standard partials: `{{> partialName}}`
* Partials with parameters: `{{> partialName varname="value"}}`
* Ddynamic partials: `{{> (partialFunc)}}`
* Ddynamic partials with lookups: `{{> (lookup ../path "partialName")}}`
* Partial blocks: `{{> @partial-block}}`
* Inline partials: `{{#*inline}}..{{/inline}}`
It also introduces support for path segments, which can reference content in
the current context or in a parent context. For instance, `this.name`,
`this/name`, `./name`, `../name`, `this/name`, etc. These are all now tracked
as variables.
Diffstat (limited to 'tests/examplefiles/example.msc')
| -rw-r--r-- | tests/examplefiles/example.msc | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/tests/examplefiles/example.msc b/tests/examplefiles/example.msc new file mode 100644 index 00000000..d51b32a6 --- /dev/null +++ b/tests/examplefiles/example.msc @@ -0,0 +1,43 @@ +msc { + hscale=5; + + //test comment + + a,b,c,d; + +/* another +comment +goes here */ /* too */ // now + + ... [label="test1", id="1"]; + --- [label="test2", id="2"]; + ||| [label="test3", id="2"]; + a ABOX b; + a--b [label="test4", id="2"]; + a == b [label="test5", id="2"]; + a .. b [label="test6", id="2"]; + a::b [label="test7", id="2"]; + a<<=>> b [label="test8", id="2"], + b <->c [label="test9", id="2"], + b RBOX c; + a BOX d; + a<=> b [label="test10", id="2"]; + a <<>> b [label="test11", id="2"]; + a<:>b [label="test12", id="2"]; + a->b [label="test13", id="2"]; + a =>> b [label="test14", id="2"], + b >> c [label="test15", id="2"], + a=> b [label="test16", id="2"]; + a :>b [label="test17", id="2"]; + a-x b [label="test18", id="2"]; + a -Xb [label="test19", id="2"]; + a<- b [label="test20", id="2"]; + a <<=b [label="test21", id="2"]; + a<< b [label="test22", id="2"]; + a <= b [label="test23", id="2"]; + a<: b [label="test24", id="2"]; + a -xb [label="test25", id="2"]; + a-X b [ label="test26",id="2" ]; + a->* [label="test27" , id="2"]; + *<-b [label="test28",id="28"]; +} |
