mirror of
https://github.com/sharkdp/bat.git
synced 2025-10-16 16:53:54 +01:00
feat: add typeScript syntax highlighting support for markdown code blocks
- Added TypeScript/ts language support to Markdown.sublime-syntax.patch - Code blocks with ```typescript or ```ts will now use TypeScript syntax highlighting - Updated patch hunk headers to reflect added lines
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
- Support negative relative line ranges, e.g. `bat -r :-10` / `bat -r='-10:'`, see #3068 (@ajesipow)
|
||||
- Support context in line ranges, e.g. `bat -r 30::5` / `bat -r 30:40:5`, see #3345 (@cavanaug)
|
||||
- Add built-in 'minus' pager, e.g. `bat --pager=builtin` see PR #3402 (@academician)
|
||||
- Syntax highlighting for typescript code blocks within Markdown files, see #3435 (@MuntasirSZN)
|
||||
|
||||
## Bugfixes
|
||||
|
||||
|
19
assets/patches/Markdown.sublime-syntax.patch
vendored
19
assets/patches/Markdown.sublime-syntax.patch
vendored
@@ -166,7 +166,7 @@ index 19dc685d..3a45ea05 100644
|
||||
- match: ^\s*$\n?
|
||||
scope: invalid.illegal.non-terminated.bold-italic.markdown
|
||||
pop: true
|
||||
@@ -1073,6 +1031,21 @@ contexts:
|
||||
@@ -1073,6 +1031,36 @@ contexts:
|
||||
escape: '{{code_fence_escape}}'
|
||||
escape_captures:
|
||||
0: meta.code-fence.definition.end.python.markdown-gfm
|
||||
@@ -185,10 +185,25 @@ index 19dc685d..3a45ea05 100644
|
||||
+ 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)
|
||||
+ {{fenced_code_block_start}}
|
||||
+ ((?i:typescript|ts))
|
||||
+ {{fenced_code_block_trailing_infostring_characters}}
|
||||
+ captures:
|
||||
+ 0: meta.code-fence.definition.begin.typescript.markdown-gfm
|
||||
+ 2: punctuation.definition.raw.code-fence.begin.markdown
|
||||
+ 5: constant.other.language-name.markdown
|
||||
+ embed: scope:source.ts
|
||||
+ embed_scope: markup.raw.code-fence.typescript.markdown-gfm
|
||||
+ escape: '{{code_fence_escape}}'
|
||||
+ escape_captures:
|
||||
+ 0: meta.code-fence.definition.end.typescript.markdown-gfm
|
||||
1: punctuation.definition.raw.code-fence.end.markdown
|
||||
- match: |-
|
||||
(?x)
|
||||
@@ -1152,7 +1125,7 @@ contexts:
|
||||
@@ -1152,7 +1155,7 @@ contexts:
|
||||
- match: |-
|
||||
(?x)
|
||||
{{fenced_code_block_start}}
|
||||
|
Reference in New Issue
Block a user