Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add elixir to set of fenced languages #183

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ Note that in order for a language to be highlighted properly, you must have the
* `c++`
* `diff`
* `ejs`
* `elixir`
* `erlang`
* `underscore`
* `go`
Expand Down
21 changes: 21 additions & 0 deletions Syntaxes/Markdown Extended.JSON-tmLanguage
Original file line number Diff line number Diff line change
Expand Up @@ -1315,6 +1315,27 @@
{
"include": "source.ruby"
}
],
"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",
"begin": "(```|~~~|{%\\s*highlight)\\s*(elixir)\\s*((?:linenos\\s*)?%})?$",
"patterns": [
{
"include": "source.elixir"
}
],
"captures": {
"1": {
Expand Down
10 changes: 10 additions & 0 deletions Syntaxes/Markdown Extended.YAML-tmLanguage
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,16 @@ patterns:
patterns:
- include: source.ruby

- name: markup.raw.block.markdown markup.raw.block.fenced.markdown
begin: (```|~~~|{%\s*highlight)\s*(elixir)\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.elixir

- name: markup.raw.block.markdown markup.raw.block.fenced.markdown
begin: (```|~~~|{%\s*highlight)\s*(rust)\s*((?:linenos\s*)?%})?$
end: (```|~~~|{%\s*endhighlight\s*%})\n
Expand Down
15 changes: 15 additions & 0 deletions Syntaxes/Markdown Extended.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,21 @@ contexts:
3: punctuation.definition.fenced.markdown
pop: true
- include: scope:source.ruby
- match: '(```|~~~|{%\s*highlight)\s*(elixir)\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.elixir
- 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.elixir
- match: '(```|~~~|{%\s*highlight)\s*(rails|erb|html\+ruby)\s*((?:linenos\s*)?%})?$'
captures:
1: punctuation.definition.fenced.markdown
Expand Down
33 changes: 33 additions & 0 deletions Syntaxes/Markdown Extended.tmLanguage
Original file line number Diff line number Diff line change
Expand Up @@ -1110,6 +1110,39 @@
</dict>
</array>
</dict>
<dict>
<key>begin</key>
<string>(```|~~~|{%\s*highlight)\s*(elixir)\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.elixir</string>
</dict>
</array>
</dict>
<dict>
<key>begin</key>
<string>(```|~~~|{%\s*highlight)\s*(rust)\s*((?:linenos\s*)?%})?$</string>
Expand Down