Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Markdown] Refactor fenced code blocks (sublimehq#2925)
* [Markdown] Sort fenced codeblock contexts alphabetically This commit just sorts embedded syntaxes by alphabetically language tag. * [Markdown] Add Diff/Patch syntax to fenced code blocks * [Markdown] Add Haskell syntax to fenced code blocks * [Markdown] Add JSX syntax to fenced code blocks * [Markdown] Add Lisp syntax to fenced code blocks * [Markdown] Add Lua syntax to fenced code blocks * [Markdown] Add Matlab syntax to fenced code blocks * [Markdown] Add OCaml syntax to fenced code blocks * [Markdown] Add Scala syntax to fenced code blocks * [Markdown] Add TSX syntax to fenced code blocks * [Markdown] Add HTML syntax to fenced code blocks * [Markdown] Fix HTML+PHP completion details * [Markdown] Reorganize fenced codeblock syntaxes Create a dedicated context for each syntax in case someone wants to address them in an inherited Markdown syntax. * [Markdown] Reorganize fenced codeblocks This commit splits `raw` context into `code-span` and `code-block`. The ladder is called `fenced-code-blocks`, finally. The reasons are: 1. `raw` is used in `inline` context, which is also used within link texts and other inline-only places which never contain code-blocks. By only matching fenced codeblocks when they are likely to appear parsing duration of syntax test file is reduced by about 10%. 2. Several duplicated explicit matches are replaced by including the new `fenced-code-blocks` context. The dedicated `fenced-syntaxes` context excludes `fenced-raw` in order to make it easier for inherited syntaxes to append further contexts. * [Markdown] Add dedicated fenced-raw-content context To reduce number of anonymous contexts and improve inherit-ability * [Markdown] Fix thematic break after fenced codeblocks Fixes sublimehq#2947 Fenced codeblocks are a separate type of block, which must not be part of ordinary paragraphs. see: https://spec.commonmark.org/0.30/#leaf-blocks * [Markdown] Simplify regexp language pattern * [Markdown] Add support for fenced `shell` language tag
- Loading branch information