Skip to content

Commit 18d963f

Browse files
authored
Merge pull request #3152 from liliwilson/markdown-puppet-syntax-highlighting
Added patch for puppet syntax highlighting in Markdown code snippets
2 parents 8a9821f + 9d91d22 commit 18d963f

File tree

2 files changed

+25
-2
lines changed

2 files changed

+25
-2
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
- Automatically choose theme based on the terminal's color scheme, see #2896 (@bash)
1313
- Add option `--binary=as-text` for printing binary content, see issue #2974 and PR #2976 (@einfachIrgendwer0815)
1414
- Make shell completions available via `--completion <shell>`, see issue #2057 and PR #3126 (@einfachIrgendwer0815)
15+
- Syntax highlighting for puppet code blocks within Markdown files, see #3152 (@liliwilson)
1516

1617
## Bugfixes
1718

assets/patches/Markdown.sublime-syntax.patch

+24-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
diff --git syntaxes/01_Packages/Markdown/Markdown.sublime-syntax syntaxes/01_Packages/Markdown/Markdown.sublime-syntax
2-
index 19dc685d..44440c7f 100644
2+
index 19dc685d..3a45ea05 100644
33
--- syntaxes/01_Packages/Markdown/Markdown.sublime-syntax
44
+++ syntaxes/01_Packages/Markdown/Markdown.sublime-syntax
55
@@ -24,7 +24,6 @@ variables:
@@ -166,7 +166,29 @@ index 19dc685d..44440c7f 100644
166166
- match: ^\s*$\n?
167167
scope: invalid.illegal.non-terminated.bold-italic.markdown
168168
pop: true
169-
@@ -1152,7 +1110,7 @@ contexts:
169+
@@ -1073,6 +1031,21 @@ contexts:
170+
escape: '{{code_fence_escape}}'
171+
escape_captures:
172+
0: meta.code-fence.definition.end.python.markdown-gfm
173+
+ 1: punctuation.definition.raw.code-fence.end.markdown
174+
+ - match: |-
175+
+ (?x)
176+
+ {{fenced_code_block_start}}
177+
+ ((?i:puppet))
178+
+ {{fenced_code_block_trailing_infostring_characters}}
179+
+ captures:
180+
+ 0: meta.code-fence.definition.begin.puppet.markdown-gfm
181+
+ 2: punctuation.definition.raw.code-fence.begin.markdown
182+
+ 5: constant.other.language-name.markdown
183+
+ embed: scope:source.puppet
184+
+ embed_scope: markup.raw.code-fence.puppet.markdown-gfm
185+
+ escape: '{{code_fence_escape}}'
186+
+ escape_captures:
187+
+ 0: meta.code-fence.definition.end.puppet.markdown-gfm
188+
1: punctuation.definition.raw.code-fence.end.markdown
189+
- match: |-
190+
(?x)
191+
@@ -1152,7 +1125,7 @@ contexts:
170192
- match: |-
171193
(?x)
172194
{{fenced_code_block_start}}

0 commit comments

Comments
 (0)