Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,9 @@ Note that in order for a language to be highlighted properly, you must have the
* `jade`
* `java`
* `javascript|js`
* `json`
* `json front matter`
* `json`
* `jsx`
* `julia`
* `less`
* `ls|livescript|LiveScript`
Expand Down
26 changes: 25 additions & 1 deletion Syntaxes/Markdown Extended.JSON-tmLanguage
Original file line number Diff line number Diff line change
Expand Up @@ -1034,6 +1034,30 @@
}
}
},
{
"name": "markup.raw.block.markdown markup.raw.block.fenced.markdown",
"end": "(```|~~~|{%\\s*endhighlight\\s*%})\\n",
"begin": "(```|~~~|{%\\s*highlight)\\s*(jsx)\\s*((?:linenos\\s*)?%})?$",
"patterns": [
{
"include": "source.js"
},
{
"include": "meta.jsx.js"
}
],
"captures": {
"1": {
"name": "punctuation.definition.fenced.markdown"
},
"2": {
"name": "variable.language.fenced.markdown"
},
"3": {
"name": "punctuation.definition.fenced.markdown"
}
}
},
{
"name": "markup.raw.block.markdown markup.raw.block.fenced.markdown",
"end": "(```|{%\\s*endhighlight\\s*%})\\n",
Expand Down Expand Up @@ -1721,4 +1745,4 @@
"md"
],
"keyEquivalent": "^~M"
}
}
11 changes: 11 additions & 0 deletions Syntaxes/Markdown Extended.YAML-tmLanguage
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,17 @@ patterns:
patterns:
- include: source.json

- name: markup.raw.block.markdown markup.raw.block.fenced.markdown
begin: (```|~~~|{%\s*highlight)\s*(jsx)\s*((?:linenos\s*)?%})?$
end: (```|~~~|{%\s*endhighlight\s*%})\n
captures:
'1': {name: punctuation.definition.fenced.markdown}
'2': {name: variable.language.fenced.markdown}
'3': {name: punctuation.definition.fenced.markdown}
patterns:
- include: source.js
- include: meta.jsx.js

- name: markup.raw.block.markdown markup.raw.block.fenced.markdown
begin: (```|{%\s*highlight)\s*(julia|jl)\s*((?:linenos\s*)?%})?$
end: (```|{%\s*endhighlight\s*%})\n
Expand Down
16 changes: 16 additions & 0 deletions Syntaxes/Markdown Extended.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,22 @@ contexts:
3: punctuation.definition.fenced.markdown
pop: true
- include: scope:source.js
- match: '(```|~~~|{%\s*highlight)\s*(jsx)\s*((?:linenos\s*)?%})?$'
captures:
1: punctuation.definition.fenced.markdown
2: variable.language.fenced.markdown
3: punctuation.definition.fenced.markdown
push:
- meta_scope: markup.raw.block.markdown markup.raw.block.fenced.markdown
- meta_content_scope: source.js
- match: '(```|~~~|{%\s*endhighlight\s*%})\n'
captures:
1: punctuation.definition.fenced.markdown
2: variable.language.fenced.markdown
3: punctuation.definition.fenced.markdown
pop: true
- include: scope:source.js
- include: scope:meta.jsx.js
- match: '(```|~~~|{%\s*highlight)\s*(json)\s*((?:linenos\s*)?%})?$'
captures:
1: punctuation.definition.fenced.markdown
Expand Down
37 changes: 37 additions & 0 deletions Syntaxes/Markdown Extended.tmLanguage
Original file line number Diff line number Diff line change
Expand Up @@ -648,6 +648,43 @@
</dict>
</array>
</dict>
<dict>
<key>begin</key>
<string>(```|~~~|{%\s*highlight)\s*(jsx)\s*((?:linenos\s*)?%})?$</string>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>punctuation.definition.fenced.markdown</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>variable.language.fenced.markdown</string>
</dict>
<key>3</key>
<dict>
<key>name</key>
<string>punctuation.definition.fenced.markdown</string>
</dict>
</dict>
<key>end</key>
<string>(```|~~~|{%\s*endhighlight\s*%})\n</string>
<key>name</key>
<string>markup.raw.block.markdown markup.raw.block.fenced.markdown</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>source.js</string>
</dict>
<dict>
<key>include</key>
<string>meta.jsx.js</string>
</dict>
</array>
</dict>
<dict>
<key>begin</key>
<string>(```|{%\s*highlight)\s*(julia|jl)\s*((?:linenos\s*)?%})?$</string>
Expand Down