-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
feat: add typescript codeblock highlight patches for markdown #3435
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
feat: add typescript codeblock highlight patches for markdown #3435
Conversation
cfb776d to
b87c3b9
Compare
…ocks - 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
b87c3b9 to
b0fa9e1
Compare
It should be possible to get CI to test it by adding a Markdown file containing a typescript code fence to https://github.com/sharkdp/bat/tree/master/tests/syntax-tests/source/Markdown |
|
@keith-hall done. |
c774501 to
66edb59
Compare
66edb59 to
0139c9d
Compare
|
Why I cannot update the highlighted versions? |
|
@keith-hall Sorry for saying but I can't update. Can you update and push in this branch and merge? Sorry again. |
|
For me it helped to do the following, in order:
having the path contain |
This MR contains the following updates: | Package | Update | Change | |---|---|---| | [sharkdp/bat](https://github.com/sharkdp/bat) | minor | `v0.25.0` -> `v0.26.0` | MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot). **Proposed changes to behavior should be submitted there as MRs.** --- ### Release Notes <details> <summary>sharkdp/bat (sharkdp/bat)</summary> ### [`v0.26.0`](https://github.com/sharkdp/bat/blob/HEAD/CHANGELOG.md#v0260) [Compare Source](sharkdp/bat@v0.25.0...v0.26.0) #### Features - Add build for windows/ARM64 platform. [#​3190](sharkdp/bat#3190) ([@​alcroito](https://github.com/alcroito)) - Add paging to `--list-themes`, see MR [#​3239](sharkdp/bat#3239) ([@​einfachIrgendwer0815](https://github.com/einfachIrgendwer0815)) - Support negative relative line ranges, e.g. `bat -r :-10` / `bat -r='-10:'`, see [#​3068](sharkdp/bat#3068) ([@​ajesipow](https://github.com/ajesipow)) - Support context in line ranges, e.g. `bat -r 30::5` / `bat -r 30:40:5`, see [#​3345](sharkdp/bat#3345) ([@​cavanaug](https://github.com/cavanaug)) - Add built-in 'minus' pager, e.g. `bat --pager=builtin` see MR [#​3402](sharkdp/bat#3402) ([@​academician](https://github.com/academician)) #### Bugfixes - Fix UTF-8 BOM not being stripped for syntax detection, see [#​3314](sharkdp/bat#3314) ([@​krikera](https://github.com/krikera)) - Fix `BAT_THEME_DARK` and `BAT_THEME_LIGHT` being ignored, see issue [#​3171](sharkdp/bat#3171) and MR [#​3168](sharkdp/bat#3168) ([@​bash](https://github.com/bash)) - Prevent `--list-themes` from outputting default theme info to stdout when it is piped, see [#​3189](sharkdp/bat#3189) ([@​einfachIrgendwer0815](https://github.com/einfachIrgendwer0815)) - Rename some submodules to fix Dependabot submodule updates, see issue [#​3198](sharkdp/bat#3198) and MR [#​3201](sharkdp/bat#3201) ([@​victor-gp](https://github.com/victor-gp)) - Make highlight tests fail when new syntaxes don't have fixtures MR [#​3255](sharkdp/bat#3255) ([@​dan-hipschman](https://github.com/dan-hipschman)) - Fix crash for multibyte characters in file path, see issue [#​3230](sharkdp/bat#3230) and MR [#​3245](sharkdp/bat#3245) ([@​HSM95](https://github.com/HSM95)) - Add missing mappings for various bash/zsh files, see MR [#​3262](sharkdp/bat#3262) ([@​AdamGaskins](https://github.com/AdamGaskins)) - Send all bat errors to stderr by default, see [#​3336](sharkdp/bat#3336) ([@​JerryImMouse](https://github.com/JerryImMouse)) - Make --map-syntax target case insensitive to match --language, see [#​3206](sharkdp/bat#3206) ([@​keith-hall](https://github.com/keith-hall)) - Correctly determine the end of the line in UTF16LE/BE input [#​3369](sharkdp/bat#3369) ([@​keith-hall](https://github.com/keith-hall)) - `--style=changes` no longer prints a two-space indent when the file is unmodified, see issue [#​2710](sharkdp/bat#2710) and MR [#​3406](sharkdp/bat#3406) ([@​jyn514](https://github.com/jyn514)) - Add missing shell completions, see [#​3411](sharkdp/bat#3411) ([@​keith-hall](https://github.com/keith-hall)) - Execute help/version/diagnostic commands even with invalid config/arguments present, see [#​3414](sharkdp/bat#3414) ([@​keith-hall](https://github.com/keith-hall)) - Fixed line numbers (`-n`) and style components not printing when piping output, see issue [#​2935](sharkdp/bat#2935) and MR [#​3438](sharkdp/bat#3438) ([@​lmmx](https://github.com/lmmx)) #### Other - Update base16 README links to community driven base16 work [#​2871](sharkdp/bat#2871) ([@​JamyGolden](https://github.com/JamyGolden)) - Work around build failures when building `bat` from vendored sources [#​3179](sharkdp/bat#3179) ([@​dtolnay](https://github.com/dtolnay)) - CICD: Stop building for x86\_64-pc-windows-gnu which fails [#​3261](sharkdp/bat#3261) (Enselic) - CICD: replace windows-2019 runners with windows-2025 [#​3339](sharkdp/bat#3339) ([@​cyqsimon](https://github.com/cyqsimon)) - Build script: replace string-based codegen with quote-based codegen [#​3340](sharkdp/bat#3340) ([@​cyqsimon](https://github.com/cyqsimon)) - Improve code coverage of `--list-languages` parameter [#​2942](sharkdp/bat#2942) ([@​sblondon](https://github.com/sblondon)) - Only start offload worker thread when there's more than 1 core [#​2956](sharkdp/bat#2956) ([@​cyqsimon](https://github.com/cyqsimon)) - Update terminal-colorsaurus (the library used for dark/light detection) to 1.0, see [#​3347](sharkdp/bat#3347) ([@​bash](https://github.com/bash)) - Update console dependency to 0.16, see [#​3351](sharkdp/bat#3351) ([@​musicinmybrain](https://github.com/musicinmybrain)) - Fixed some typos [#​3244](sharkdp/bat#3244) ([@​ssbarnea](https://github.com/ssbarnea)) - Update onig\_sys dependency to 69.9.1 to fix a gcc build failure [#​3400](sharkdp/bat#3400) ([@​CosmicHorrorDev](https://github.com/CosmicHorrorDev)) - Add a cargo feature (`vendored-libgit2`) to build with vendored libgit2 version without depending on the system's one [#​3426](sharkdp/bat#3426) ([@​0x61nas](https://github.com/0x61nas)) - Update syntect dependency to v5.3.0 to fix a few minor bugs, see [#​3410](sharkdp/bat#3410) ([@​keith-hall](https://github.com/keith-hall)) #### Syntaxes - Add syntax mapping for `paru` configuration files [#​3182](sharkdp/bat#3182) ([@​cyqsimon](https://github.com/cyqsimon)) - Add support for [Idris 2 programming language](https://www.idris-lang.org/) [#​3150](sharkdp/bat#3150) ([@​buzden](https://github.com/buzden)) - Add syntax mapping for `nix`'s '`flake.lock` lockfiles [#​3196](sharkdp/bat#3196) ([@​odilf](https://github.com/odilf)) - Improvements to CSV/TSV highlighting, with autodetection of delimiter and support for TSV files, see [#​3186](sharkdp/bat#3186) ([@​keith-](https://github.com/keith-) - Improve (Sys)log error highlighting, see [#​3205](sharkdp/bat#3205) ([@​keith-hall](https://github.com/keith-hall)) - Map `ndjson` extension to JSON syntax, see [#​3209](sharkdp/bat#3209) ([@​keith-hall](https://github.com/keith-hall)) - Map files with `csproj`, `vbproj`, `props` and `targets` extensions to XML syntax, see [#​3213](sharkdp/bat#3213) ([@​keith-hall](https://github.com/keith-hall)) - Add debsources syntax to highlight `/etc/apt/sources.list` files, see [#​3215](sharkdp/bat#3215) ([@​keith-hall](https://github.com/keith-hall)) - Add syntax definition and test file for GDScript highlighting, see [#​3236](sharkdp/bat#3236) ([@​chetanjangir0](https://github.com/chetanjangir0)) - Add syntax test file for Odin highlighting, see [#​3241](sharkdp/bat#3241) ([@​chetanjangir0](https://github.com/chetanjangir0)) - Update quadlet syntax mapping rules to cover quadlets in subdirectories [#​3299](sharkdp/bat#3299) ([@​cyqsimon](https://github.com/cyqsimon)) - Add syntax Typst [#​3300](sharkdp/bat#3300) ([@​cskeeters](https://github.com/cskeeters)) - Map `.mill` files to Scala syntax for Mill build tool configuration files [#​3311](sharkdp/bat#3311) ([@​krikera](https://github.com/krikera)) - Add syntax highlighting for VHDL, see [#​3337](sharkdp/bat#3337) ([@​JerryImMouse](https://github.com/JerryImMouse)) - Add syntax mapping for certbot certificate configuration [#​3338](sharkdp/bat#3338) ([@​cyqsimon](https://github.com/cyqsimon)) - Update Lean syntax from Lean 3 to Lean 4 [#​3322](sharkdp/bat#3322) ([@​YDX-2147483647](https://github.com/YDX-2147483647)) - Map `.flatpakref` and `.flatpakrepo` files to INI syntax [#​3353](sharkdp/bat#3353) ([@​Ferenc-](https://github.com/Ferenc-)) - Update hosts syntax [#​3368](sharkdp/bat#3368) ([@​keith-hall](https://github.com/keith-hall)) - Map `.kshrc` files to Bash syntax [#​3364](sharkdp/bat#3364) ([@​ritoban23](https://github.com/ritoban23)) - Map `/var/log/dmesg` files to Syslog syntax [#​3412](sharkdp/bat#3412) ([@​keith-hall](https://github.com/keith-hall)) - Add syntax definition and test file for Go modules(`go.mod` and `go.sum`) highlighting, see [#​3424](sharkdp/bat#3424) ([@​DarkMatter-999](https://github.com/DarkMatter-999)) - Syntax highlighting for typescript code blocks within Markdown files, see [#​3435](sharkdp/bat#3435) ([@​MuntasirSZN](https://github.com/MuntasirSZN)) #### Themes - Add Catppuccin, see [#​3317](sharkdp/bat#3317) ([@​SchweGELBin](https://github.com/SchweGELBin)) - Updated Catppuccin, see [#​3333](sharkdp/bat#3333) ([@​SchweGELBin](https://github.com/SchweGELBin)) - Updated gruvbox, see [#​3372](sharkdp/bat#3372) ([@​Nicholas42](https://github.com/Nicholas42)) - Updated GitHub theme, see [#​3382](sharkdp/bat#3382) ([@​CosmicHorrorDev](https://github.com/CosmicHorrorDev)) - Updated ANSI theme to highlight JSON object keys differently from values, see [#​3413](sharkdp/bat#3413) ([@​keith-hall](https://github.com/keith-hall)) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this MR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box --- This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS4xNTEuMSIsInVwZGF0ZWRJblZlciI6IjQxLjE1Mi45IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJSZW5vdmF0ZSBCb3QiXX0=-->
Fixes #3148
Fixes #2084
This should be tested by someone other then me for confirmation.