Skip to content

Commit 397f434

Browse files
committed
Add pattern-matching for other <literal> formats
1 parent 291cdf8 commit 397f434

File tree

12 files changed

+2749
-535
lines changed

12 files changed

+2749
-535
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@
22
/spec/fixtures/*/* binary
33

44
# Exclude from package distribution
5+
*.sy export-ignore linguist-language=RegExp
56
/spec export-ignore
67
/.travis.yml export-ignore

grammars/muse-literal.sy

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
­­
2+
name: meta.unprocessed.$8-output.muse
3+
begin: /(?x)
4+
(?<0: meta.tag.literal.muse>
5+
^ \s*
6+
(?<1: entity.name.tag.quote.muse>
7+
(?<2: punctuation.definition.tag.begin.muse> <)
8+
literal \s+
9+
10+
(?<3: meta.attribute-with-value.style.muse>
11+
(?<4: entity.other.attribute-name.$_.muse> style) \s*
12+
(?<5: punctuation.separator.key-value.muse> =) \s*
13+
(?<6: string.quoted.muse>
14+
(?<7: punctuation.definition.string.begin.muse> "|'|\b)
15+
( book-latex
16+
| book-pdf
17+
| chapbook-latex
18+
| chapbook-pdf
19+
| context-pdf
20+
| context-slides-pdf
21+
| context-slides
22+
| context
23+
| journal-book-latex
24+
| journal-book-pdf
25+
| journal-latex
26+
| journal-pdf
27+
| journal-xhtml
28+
| latexcjk
29+
| latex
30+
| lecture-notes-pdf
31+
| lecture-notes
32+
| pdfcjk
33+
| pdf
34+
| poem-latex
35+
| poem-pdf
36+
| slides-pdf
37+
| slides
38+
)
39+
(?<8: punctuation.definition.string.end.muse> \7)
40+
)
41+
) \s*
42+
43+
(?<9: punctuation.definition.tag.end.muse> >)
44+
)
45+
)
46+
/
47+
48+
end: /(</)literal(>)/
49+
contentName: text.embedded.latex
50+
patterns: [include: "text.tex.latex"]

0 commit comments

Comments
 (0)