From 3fa9044029d166201f44bafe17b25d0bfe2b2cb8 Mon Sep 17 00:00:00 2001 From: Lili Wilson Date: Wed, 25 Dec 2024 21:03:54 -0500 Subject: [PATCH 1/2] added patch for puppet syntax highlighting in markdown --- assets/patches/Markdown.sublime-syntax.patch | 26 ++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/assets/patches/Markdown.sublime-syntax.patch b/assets/patches/Markdown.sublime-syntax.patch index 600b6b11..a295334c 100644 --- a/assets/patches/Markdown.sublime-syntax.patch +++ b/assets/patches/Markdown.sublime-syntax.patch @@ -1,5 +1,5 @@ diff --git syntaxes/01_Packages/Markdown/Markdown.sublime-syntax syntaxes/01_Packages/Markdown/Markdown.sublime-syntax -index 19dc685d..44440c7f 100644 +index 19dc685d..3a45ea05 100644 --- syntaxes/01_Packages/Markdown/Markdown.sublime-syntax +++ syntaxes/01_Packages/Markdown/Markdown.sublime-syntax @@ -24,7 +24,6 @@ variables: @@ -166,7 +166,29 @@ index 19dc685d..44440c7f 100644 - match: ^\s*$\n? scope: invalid.illegal.non-terminated.bold-italic.markdown pop: true -@@ -1152,7 +1110,7 @@ contexts: +@@ -1073,6 +1031,21 @@ contexts: + escape: '{{code_fence_escape}}' + escape_captures: + 0: meta.code-fence.definition.end.python.markdown-gfm ++ 1: punctuation.definition.raw.code-fence.end.markdown ++ - match: |- ++ (?x) ++ {{fenced_code_block_start}} ++ ((?i:puppet)) ++ {{fenced_code_block_trailing_infostring_characters}} ++ captures: ++ 0: meta.code-fence.definition.begin.puppet.markdown-gfm ++ 2: punctuation.definition.raw.code-fence.begin.markdown ++ 5: constant.other.language-name.markdown ++ embed: scope:source.puppet ++ embed_scope: markup.raw.code-fence.puppet.markdown-gfm ++ escape: '{{code_fence_escape}}' ++ escape_captures: ++ 0: meta.code-fence.definition.end.puppet.markdown-gfm + 1: punctuation.definition.raw.code-fence.end.markdown + - match: |- + (?x) +@@ -1152,7 +1125,7 @@ contexts: - match: |- (?x) {{fenced_code_block_start}} From 9d91d22e29dd8be588908b67ff71db76c550e19d Mon Sep 17 00:00:00 2001 From: Lili Wilson Date: Wed, 25 Dec 2024 21:16:35 -0500 Subject: [PATCH 2/2] changelog entry --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 16bbc522..8c05a649 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ - Automatically choose theme based on the terminal's color scheme, see #2896 (@bash) - Add option `--binary=as-text` for printing binary content, see issue #2974 and PR #2976 (@einfachIrgendwer0815) - Make shell completions available via `--completion `, see issue #2057 and PR #3126 (@einfachIrgendwer0815) +- Syntax highlighting for puppet code blocks within Markdown files, see #3152 (@liliwilson) ## Bugfixes