From acf66aac25664fb04537863eef4e015f4e89c626 Mon Sep 17 00:00:00 2001 From: deathaxe Date: Sat, 30 Dec 2023 17:42:39 +0100 Subject: [PATCH 1/9] Syntax: Fix premature block quote termination This commit makes sure block quotes' meta scopes span all subsequent paragraphs. --- messages/next.md | 14 ++++ syntaxes/Markdown.sublime-syntax | 8 +-- tests/syntax_test_markdown.md | 120 +++++++++++++++++++++++++++++++ 3 files changed, 138 insertions(+), 4 deletions(-) create mode 100644 messages/next.md diff --git a/messages/next.md b/messages/next.md new file mode 100644 index 00000000..cb803827 --- /dev/null +++ b/messages/next.md @@ -0,0 +1,14 @@ +# MarkdownEditing {version} Changelog + +Your _MarkdownEditing_ plugin is updated. Enjoy new version. For any type of +feedback you can use [GitHub issues][issues]. + +## Bug Fixes + +- fix premature block quote termination + +## New Features + +## Changes + +[issues]: https://github.com/SublimeText-Markdown/MarkdownEditing/issues diff --git a/syntaxes/Markdown.sublime-syntax b/syntaxes/Markdown.sublime-syntax index a818e051..297557e7 100644 --- a/syntaxes/Markdown.sublime-syntax +++ b/syntaxes/Markdown.sublime-syntax @@ -624,14 +624,14 @@ contexts: 4: markup.checkbox.begin.markdown-gfm punctuation.definition.checkbox.begin.markdown-gfm 5: markup.checkbox.mark.markdown-gfm 6: markup.checkbox.end.markdown-gfm punctuation.definition.checkbox.end.markdown-gfm - set: block-quote-unordered-list-block-body + push: block-quote-unordered-list-block-body - match: ([ \t]*)(\d{1,9}([.)]))(\s) captures: 1: markup.list.numbered.markdown 2: markup.list.numbered.bullet.markdown 3: punctuation.definition.list_item.markdown 4: markup.list.numbered.markdown - set: block-quote-ordered-list-block-body + push: block-quote-ordered-list-block-body block-quote-ordered-list-block-body: - meta_content_scope: markup.list.numbered.markdown @@ -691,7 +691,7 @@ contexts: block-quote-paragraph: - match: '[ \t]*(?=\S)' - set: block-quote-paragraph-body + push: block-quote-paragraph-body block-quote-paragraph-body: - meta_scope: markup.paragraph.markdown @@ -856,7 +856,7 @@ contexts: list-block-quote-paragraph: - match: '[ \t]*(?=\S)' - set: list-block-quote-paragraph-body + push: list-block-quote-paragraph-body list-block-quote-paragraph-body: - meta_scope: markup.paragraph.markdown diff --git a/tests/syntax_test_markdown.md b/tests/syntax_test_markdown.md index 7447b616..d0077b4a 100644 --- a/tests/syntax_test_markdown.md +++ b/tests/syntax_test_markdown.md @@ -7886,6 +7886,66 @@ This is a [[wiki link]]. |^ markup.quote.alert.caution.markdown - markup.paragraph | ^^^^^ markup.quote.alert.caution.markdown markup.paragraph.markdown +> [!CAUTION] +> +> Paragraph 1 +> +> Paragraph 2 +| <- markup.quote.alert.caution.markdown punctuation.definition.blockquote.markdown +|^ markup.quote.alert.caution.markdown - markup.paragraph +| ^^^^^^^^^^^ markup.quote.alert.caution.markdown markup.paragraph.markdown + +> [!CAUTION] +> +> - list item +> +> - list item +| <- markup.quote.alert.caution.markdown punctuation.definition.blockquote.markdown +|^ markup.quote.alert.caution.markdown +| ^ markup.quote.alert.caution.markdown markup.list.unnumbered.bullet.markdown punctuation.definition.list_item.markdown +| ^^^^^^^^^^^ markup.quote.alert.caution.markdown markup.list.unnumbered.markdown + +> [!CAUTION] +> +> 1. list item +> +> 2. list item +| <- markup.quote.alert.caution.markdown punctuation.definition.blockquote.markdown +|^ markup.quote.alert.caution.markdown +| ^^ markup.quote.alert.caution.markdown markup.list.numbered.bullet.markdown +| ^ punctuation.definition.list_item.markdown +| ^^^^^^^^^^ markup.quote.alert.caution.markdown markup.list.numbered.markdown + +> [!CAUTION] +> +> 1. list item +> +> 2. list item paragraph 1 +> +> list item paragraph 2 +| <- markup.quote.alert.caution.markdown markup.list.numbered.markdown punctuation.definition.blockquote.markdown +|^^^^^^^^^^^^^^^^^^^^^^^^^^ markup.quote.alert.caution.markdown markup.list.numbered.markdown + +> [!CAUTION] +> +> Paragraph 1 +> +> # Heading +> +> Paragraph 2 +| <- markup.quote.alert.caution.markdown punctuation.definition.blockquote.markdown +|^^^^^^^^^^^^^ markup.quote.alert.caution.markdown + +> [!CAUTION] +> +> ``` +> fenced code +> ``` +> +> Paragraph 2 +| <- markup.quote.alert.caution.markdown punctuation.definition.blockquote.markdown +|^^^^^^^^^^^^^ markup.quote.alert.caution.markdown + > [!WARNING] | <- markup.quote.alert.warning.markdown punctuation.definition.blockquote.markdown |^^^^^^^^^^^^ markup.quote.alert.warning.markdown @@ -7958,6 +8018,66 @@ This is a [[wiki link]]. |^ markup.quote.alert.caution.markdown - markup.paragraph | ^^^^^ markup.quote.alert.caution.markdown markup.paragraph.markdown + > [!CAUTION] + > + > Paragraph 1 + > + > Paragraph 2 + | <- markup.quote.alert.caution.markdown punctuation.definition.blockquote.markdown + |^ markup.quote.alert.caution.markdown - markup.paragraph + | ^^^^^^^^^^^ markup.quote.alert.caution.markdown markup.paragraph.markdown + + > [!CAUTION] + > + > - list item + > + > - list item + | <- markup.quote.alert.caution.markdown punctuation.definition.blockquote.markdown + |^ markup.quote.alert.caution.markdown + | ^ markup.quote.alert.caution.markdown markup.list.unnumbered.bullet.markdown punctuation.definition.list_item.markdown + | ^^^^^^^^^^^ markup.quote.alert.caution.markdown markup.list.unnumbered.markdown + + > [!CAUTION] + > + > 1. list item + > + > 2. list item + | <- markup.quote.alert.caution.markdown punctuation.definition.blockquote.markdown + |^ markup.quote.alert.caution.markdown + | ^^ markup.quote.alert.caution.markdown markup.list.numbered.bullet.markdown + | ^ punctuation.definition.list_item.markdown + | ^^^^^^^^^^ markup.quote.alert.caution.markdown markup.list.numbered.markdown + + > [!CAUTION] + > + > 1. list item + > + > 2. list item paragraph 1 + > + > list item paragraph 2 + | <- markup.quote.alert.caution.markdown markup.list.numbered.markdown punctuation.definition.blockquote.markdown + |^^^^^^^^^^^^^^^^^^^^^^^^^^ markup.quote.alert.caution.markdown markup.list.numbered.markdown + + > [!CAUTION] + > + > Paragraph 1 + > + > # Heading + > + > Paragraph 2 + | <- markup.quote.alert.caution.markdown punctuation.definition.blockquote.markdown + |^^^^^^^^^^^^^ markup.quote.alert.caution.markdown + + > [!CAUTION] + > + > ``` + > fenced code + > ``` + > + > Paragraph 2 + | <- markup.quote.alert.caution.markdown punctuation.definition.blockquote.markdown + |^^^^^^^^^^^^^ markup.quote.alert.caution.markdown + 1. list item > [!WARNING] | <- markup.quote.alert.warning.markdown punctuation.definition.blockquote.markdown From dc81b290ed6dc1bde2ff9417e0bd685a3e7df311 Mon Sep 17 00:00:00 2001 From: deathaxe Date: Sat, 30 Dec 2023 18:53:43 +0100 Subject: [PATCH 2/9] Syntax: Remove useless context pushes This commit removes block-quote punctuation contexts from being pushed on stack, which do not have any effect in conjunction with Github Alerts. They are required support multiple > > > markers in front of content, which is not supported by Github Alerts. Due to consuming caption text pushing those contexts does actually nothing, but causing some extra round-trips. --- syntaxes/Markdown.sublime-syntax | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/syntaxes/Markdown.sublime-syntax b/syntaxes/Markdown.sublime-syntax index 297557e7..aa1906ef 100644 --- a/syntaxes/Markdown.sublime-syntax +++ b/syntaxes/Markdown.sublime-syntax @@ -355,7 +355,6 @@ contexts: push: - block-quote-caution-meta - block-quote-body - - block-quote-punctuation-body - match: '[ \t]{,3}(>)[ ]?((\[)!WARNING(\]))' captures: 1: punctuation.definition.blockquote.markdown @@ -365,7 +364,6 @@ contexts: push: - block-quote-warning-meta - block-quote-body - - block-quote-punctuation-body - match: '[ \t]{,3}(>)[ ]?((\[)!IMPORTANT(\]))' captures: 1: punctuation.definition.blockquote.markdown @@ -375,7 +373,6 @@ contexts: push: - block-quote-important-meta - block-quote-body - - block-quote-punctuation-body - match: '[ \t]{,3}(>)[ ]?((\[)!NOTE(\]))' captures: 1: punctuation.definition.blockquote.markdown @@ -385,7 +382,6 @@ contexts: push: - block-quote-note-meta - block-quote-body - - block-quote-punctuation-body - match: '[ \t]{,3}(>)[ ]?((\[)!TIP(\]))' captures: 1: punctuation.definition.blockquote.markdown @@ -395,7 +391,6 @@ contexts: push: - block-quote-tip-meta - block-quote-body - - block-quote-punctuation-body - match: '[ \t]{,3}(>)[ ]?' captures: 1: punctuation.definition.blockquote.markdown @@ -789,7 +784,6 @@ contexts: push: - block-quote-caution-meta - list-block-quote-body - - block-quote-punctuation-body - match: '[ \t]{,3}(>)[ ]?((\[)!WARNING(\]))' captures: 1: punctuation.definition.blockquote.markdown @@ -799,7 +793,6 @@ contexts: push: - block-quote-warning-meta - list-block-quote-body - - block-quote-punctuation-body - match: '[ \t]{,3}(>)[ ]?((\[)!IMPORTANT(\]))' captures: 1: punctuation.definition.blockquote.markdown @@ -809,7 +802,6 @@ contexts: push: - block-quote-important-meta - list-block-quote-body - - block-quote-punctuation-body - match: '[ \t]{,3}(>)[ ]?((\[)!NOTE(\]))' captures: 1: punctuation.definition.blockquote.markdown @@ -819,7 +811,6 @@ contexts: push: - block-quote-note-meta - list-block-quote-body - - block-quote-punctuation-body - match: '[ \t]{,3}(>)[ ]?((\[)!TIP(\]))' captures: 1: punctuation.definition.blockquote.markdown @@ -829,7 +820,6 @@ contexts: push: - block-quote-tip-meta - list-block-quote-body - - block-quote-punctuation-body - match: '[ \t]*(>)[ ]?' captures: 1: punctuation.definition.blockquote.markdown From 1be39ae6518e69befbfaf14ca87433d91988a7a7 Mon Sep 17 00:00:00 2001 From: deathaxe Date: Sat, 30 Dec 2023 19:15:16 +0100 Subject: [PATCH 3/9] Fix .editorconfig - explicitly mention different file types - fix sublime-syntax indentation settings --- .editorconfig | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/.editorconfig b/.editorconfig index d3a33e2f..212f7d0c 100644 --- a/.editorconfig +++ b/.editorconfig @@ -7,14 +7,35 @@ indent_size = 4 insert_final_newline = true trim_trailing_whitespace = true -[*.json] -indent_style = tab +# Markdown [*.md] +indent_style = space +indent_size = 2 trim_trailing_whitespace = false +# JSON + +[*.json] +indent_style = tab +indent_size = 4 + [*.sublime-*] indent_style = tab +indent_size = 4 + +# XML [*.tmPreferences] indent_style = tab +indent_size = 4 + +# YAML + +[*.sublime-syntax] +indent_style = space +indent_size = 2 + +[*.yml] +indent_style = space +indent_size = 2 From cdb765ef8d56903b2552ffc222604227588bfa29 Mon Sep 17 00:00:00 2001 From: deathaxe Date: Fri, 2 Feb 2024 20:48:31 +0100 Subject: [PATCH 4/9] Keymap: Fix extra backticks Fixes #749 --- Default (Linux).sublime-keymap | 2 +- Default (OSX).sublime-keymap | 2 +- Default (Windows).sublime-keymap | 2 +- messages/next.md | 1 + 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Default (Linux).sublime-keymap b/Default (Linux).sublime-keymap index 712cdc9d..d0f839e7 100644 --- a/Default (Linux).sublime-keymap +++ b/Default (Linux).sublime-keymap @@ -190,7 +190,7 @@ }, { "keys": ["`"], "command": "move", "args": {"by": "characters", "forward": true}, "context": [ - { "key": "selector", "operator": "equal", "operand": "text.html.markdown markup.raw - meta.code-fence - markup.raw.code-fence", "match_all": true }, + { "key": "selector", "operator": "equal", "operand": "text.html.markdown markup.raw - markup.raw.code-fence", "match_all": true }, { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, { "key": "following_text", "operator": "regex_contains", "operand": "^`", "match_all": true } ] diff --git a/Default (OSX).sublime-keymap b/Default (OSX).sublime-keymap index 92e23afd..e7500b82 100644 --- a/Default (OSX).sublime-keymap +++ b/Default (OSX).sublime-keymap @@ -190,7 +190,7 @@ }, { "keys": ["`"], "command": "move", "args": {"by": "characters", "forward": true}, "context": [ - { "key": "selector", "operator": "equal", "operand": "text.html.markdown markup.raw - meta.code-fence - markup.raw.code-fence", "match_all": true }, + { "key": "selector", "operator": "equal", "operand": "text.html.markdown markup.raw - markup.raw.code-fence", "match_all": true }, { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, { "key": "following_text", "operator": "regex_contains", "operand": "^`", "match_all": true } ] diff --git a/Default (Windows).sublime-keymap b/Default (Windows).sublime-keymap index 712cdc9d..d0f839e7 100644 --- a/Default (Windows).sublime-keymap +++ b/Default (Windows).sublime-keymap @@ -190,7 +190,7 @@ }, { "keys": ["`"], "command": "move", "args": {"by": "characters", "forward": true}, "context": [ - { "key": "selector", "operator": "equal", "operand": "text.html.markdown markup.raw - meta.code-fence - markup.raw.code-fence", "match_all": true }, + { "key": "selector", "operator": "equal", "operand": "text.html.markdown markup.raw - markup.raw.code-fence", "match_all": true }, { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, { "key": "following_text", "operator": "regex_contains", "operand": "^`", "match_all": true } ] diff --git a/messages/next.md b/messages/next.md index cb803827..3187f290 100644 --- a/messages/next.md +++ b/messages/next.md @@ -6,6 +6,7 @@ feedback you can use [GitHub issues][issues]. ## Bug Fixes - fix premature block quote termination +- fix extra backticks when creating fenced code blocks (#749) ## New Features From cef05943725524c21713d7ac1224fac91953a562 Mon Sep 17 00:00:00 2001 From: deathaxe Date: Sat, 3 Feb 2024 10:10:18 +0100 Subject: [PATCH 5/9] Syntax: Add support for LaTeX in fenced code blocks --- messages/next.md | 2 ++ syntaxes/Markdown.sublime-syntax | 21 +++++++++++++++++++++ tests/syntax_test_markdown.md | 12 ++++++++++++ 3 files changed, 35 insertions(+) diff --git a/messages/next.md b/messages/next.md index 3187f290..b6173b75 100644 --- a/messages/next.md +++ b/messages/next.md @@ -10,6 +10,8 @@ feedback you can use [GitHub issues][issues]. ## New Features +- syntax highlighting for LaTeX in fenced code blocks + ## Changes [issues]: https://github.com/SublimeText-Markdown/MarkdownEditing/issues diff --git a/syntaxes/Markdown.sublime-syntax b/syntaxes/Markdown.sublime-syntax index aa1906ef..a7c590a9 100644 --- a/syntaxes/Markdown.sublime-syntax +++ b/syntaxes/Markdown.sublime-syntax @@ -1040,6 +1040,7 @@ contexts: - include: fenced-jsonc - include: fenced-jspx - include: fenced-jsx + - include: fenced-latex - include: fenced-lisp - include: fenced-lua - include: fenced-makefile @@ -1496,6 +1497,26 @@ contexts: 1: punctuation.definition.raw.code-fence.end.markdown 2: meta.fold.code-fence.end.markdown + fenced-latex: + - match: |- + (?x) + {{fenced_code_block_start}} + (?i:\s*(latex|tex)) + {{fenced_code_block_trailing_infostring_characters}} + captures: + 0: meta.code-fence.definition.begin.latex.markdown-gfm + 2: punctuation.definition.raw.code-fence.begin.markdown + 5: constant.other.language-name.markdown + 6: comment.line.infostring.markdown + 7: meta.fold.code-fence.begin.markdown + embed: scope:text.tex.latex + embed_scope: markup.raw.code-fence.latex.markdown-gfm + escape: '{{fenced_code_block_escape}}' + escape_captures: + 0: meta.code-fence.definition.end.latex.markdown-gfm + 1: punctuation.definition.raw.code-fence.end.markdown + 2: meta.fold.code-fence.end.markdown + fenced-lisp: - match: |- (?x) diff --git a/tests/syntax_test_markdown.md b/tests/syntax_test_markdown.md index d0077b4a..139b54d9 100644 --- a/tests/syntax_test_markdown.md +++ b/tests/syntax_test_markdown.md @@ -1668,6 +1668,18 @@ for (var i = 0; i < 10; i++) { |^^ meta.code-fence.definition.end.jsx.markdown-gfm punctuation.definition.raw.code-fence.end.markdown | ^ meta.code-fence.definition.end.jsx.markdown-gfm meta.fold.code-fence.end - punctuation +```latex +| <- meta.code-fence.definition.begin.latex.markdown-gfm punctuation.definition.raw.code-fence.begin.markdown +|^^ meta.code-fence.definition.begin.latex.markdown-gfm punctuation.definition.raw.code-fence.begin.markdown +| ^^^^^ meta.code-fence.definition.begin.latex.markdown-gfm constant.other.language-name.markdown +| ^ meta.code-fence.definition.begin.latex.markdown-gfm meta.fold.code-fence.begin.markdown - punctuation + +| <- markup.raw.code-fence.latex.markdown-gfm text.tex.latex +``` +| <- meta.code-fence.definition.end.latex.markdown-gfm punctuation.definition.raw.code-fence.end.markdown +|^^ meta.code-fence.definition.end.latex.markdown-gfm punctuation.definition.raw.code-fence.end.markdown +| ^ meta.code-fence.definition.end.latex.markdown-gfm meta.fold.code-fence.end.markdown - punctuation + ```lisp |^^^^^^ meta.code-fence.definition.begin - meta.fold | ^ meta.code-fence.definition.begin meta.fold.code-fence.begin From 2278c5c157a2c721c841b29b48e6a20c8f9a612a Mon Sep 17 00:00:00 2001 From: deathaxe Date: Sun, 17 Mar 2024 23:28:11 +0100 Subject: [PATCH 6/9] CI: Upgrade unittest actions --- .coveragerc | 2 ++ .github/workflows/ci-lint.yml | 6 +++--- .github/workflows/ci-syntax-tests.yml | 4 +--- .github/workflows/ci-unit-tests.yml | 4 ++-- .github/workflows/deploy-gh-pages.yml | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) create mode 100644 .coveragerc diff --git a/.coveragerc b/.coveragerc new file mode 100644 index 00000000..321e5ca0 --- /dev/null +++ b/.coveragerc @@ -0,0 +1,2 @@ +[run] +omit = */tests/* diff --git a/.github/workflows/ci-lint.yml b/.github/workflows/ci-lint.yml index 1e408434..28f120ab 100644 --- a/.github/workflows/ci-lint.yml +++ b/.github/workflows/ci-lint.yml @@ -21,7 +21,7 @@ on: jobs: lint: name: Python ${{ matrix.python }} - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest strategy: matrix: python: @@ -30,9 +30,9 @@ jobs: - 'x64' steps: - name: Checkout Repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python }} - uses: actions/setup-python@v3 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python }} architecture: ${{ matrix.arch }} diff --git a/.github/workflows/ci-syntax-tests.yml b/.github/workflows/ci-syntax-tests.yml index 3150bae0..5081d478 100644 --- a/.github/workflows/ci-syntax-tests.yml +++ b/.github/workflows/ci-syntax-tests.yml @@ -32,10 +32,8 @@ jobs: default_packages: st3 - build: 4107 default_packages: v4107 - - build: latest - default_packages: master steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: SublimeText/syntax-test-action@v2 with: build: ${{ matrix.build }} diff --git a/.github/workflows/ci-unit-tests.yml b/.github/workflows/ci-unit-tests.yml index c80431b9..138ad587 100644 --- a/.github/workflows/ci-unit-tests.yml +++ b/.github/workflows/ci-unit-tests.yml @@ -28,11 +28,11 @@ jobs: matrix: st-version: [3, 4] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: SublimeText/UnitTesting/actions/setup@v1 with: sublime-text-version: ${{ matrix.st-version }} - uses: SublimeText/UnitTesting/actions/run-tests@v1 with: coverage: true - codecov-upload: true + - uses: codecov/codecov-action@v4 diff --git a/.github/workflows/deploy-gh-pages.yml b/.github/workflows/deploy-gh-pages.yml index 24a3c5cc..d59b0d2f 100644 --- a/.github/workflows/deploy-gh-pages.yml +++ b/.github/workflows/deploy-gh-pages.yml @@ -14,11 +14,11 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 - name: Set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: '3.8' - name: Install MkDocs From 342e0b5b1ac927c26c1e6872d5c2db8eac7fdd94 Mon Sep 17 00:00:00 2001 From: deathaxe Date: Fri, 26 Apr 2024 17:54:59 +0200 Subject: [PATCH 7/9] Syntax: Fix backticks and code-spans in table cells This commit... 1. removes `invalid.deprecated` scoping from backticks in table cells 2. fixes code spans treatment in tables. They are terminated by - `|` cell separator - end of line --- messages/next.md | 1 + syntaxes/Markdown.sublime-syntax | 16 ++++++++++++---- tests/syntax_test_markdown.md | 16 +++++++++++++--- 3 files changed, 26 insertions(+), 7 deletions(-) diff --git a/messages/next.md b/messages/next.md index b6173b75..825aa4b4 100644 --- a/messages/next.md +++ b/messages/next.md @@ -7,6 +7,7 @@ feedback you can use [GitHub issues][issues]. - fix premature block quote termination - fix extra backticks when creating fenced code blocks (#749) +- fix syntax highlighting of single backticks and code-spans in table cells ## New Features diff --git a/syntaxes/Markdown.sublime-syntax b/syntaxes/Markdown.sublime-syntax index a7c590a9..f043fcfd 100644 --- a/syntaxes/Markdown.sublime-syntax +++ b/syntaxes/Markdown.sublime-syntax @@ -9,7 +9,7 @@ # # The scope suffix should indicate which flavor of Markdown the feature came from, # to help make this syntax definition easier to maintain. -name: Markdown +name: Markdown (MDE) scope: text.html.markdown hidden: true @@ -2910,14 +2910,22 @@ contexts: table-cell-content: - match: (?={{balanced_emphasis}}) push: table-cell-emphasis - - match: (?!{{backticks}})`+ - scope: invalid.deprecated.unescaped-backticks.markdown + - include: table-cell-code-spans - include: table-cell-separators - include: images - - include: literals + - include: critics + - include: math-inline + - include: escapes - include: links - include: markups + table-cell-code-spans: + - match: (`+)[^`|]+(\1) + scope: markup.raw.inline.markdown + captures: + 1: punctuation.definition.raw.begin.markdown + 2: punctuation.definition.raw.end.markdown + table-cell-emphasis: - include: emphasis - include: immediately-pop diff --git a/tests/syntax_test_markdown.md b/tests/syntax_test_markdown.md index 139b54d9..d9165a20 100644 --- a/tests/syntax_test_markdown.md +++ b/tests/syntax_test_markdown.md @@ -2921,8 +2921,9 @@ bar | baz | f\|oo | | ------ | | b `|` az | -| ^^^ meta.table markup.raw.inline - meta.table.header-separator -| ^ meta.table punctuation.separator.table-cell +|^^^^^^^^^^^ meta.table.markdown-gfm - markup.raw +| ^ punctuation.separator.table-cell.markdown +| ^ punctuation.separator.table-cell.markdown | b **|** im | | <- meta.table punctuation.separator.table-cell | ^^^^^ meta.table markup.bold - punctuation.separator.table-cell @@ -2991,8 +2992,17 @@ not a table | | ^ punctuation.separator.table-cell | ^ punctuation.separator.table-cell |`test | me | -|^ invalid.deprecated.unescaped-backticks +|^^^^^^^^^^^^^ meta.table.markdown-gfm - markup.raw | ^ punctuation.separator.table-cell +| ` ` | ` me ` | +| <- meta.table.markdown-gfm punctuation.separator.table-cell.markdown +| ^^^ meta.table.markdown-gfm markup.raw.inline.markdown +| ^ punctuation.definition.raw.begin.markdown +| ^ punctuation.definition.raw.end.markdown +| ^ punctuation.separator.table-cell +| ^^^^^^ markup.raw.inline.markdown +| ^ punctuation.definition.raw.begin.markdown +| ^ punctuation.definition.raw.end.markdown | table | followed by paragraph From 0da9d6319f3f668594e2ba84afa449ceb8c69510 Mon Sep 17 00:00:00 2001 From: deathaxe Date: Fri, 26 Apr 2024 18:51:28 +0200 Subject: [PATCH 8/9] CI: drop ST4 syntax tests --- .github/workflows/ci-syntax-tests.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/ci-syntax-tests.yml b/.github/workflows/ci-syntax-tests.yml index 5081d478..2de430a0 100644 --- a/.github/workflows/ci-syntax-tests.yml +++ b/.github/workflows/ci-syntax-tests.yml @@ -30,8 +30,6 @@ jobs: include: - build: 3211 default_packages: st3 - - build: 4107 - default_packages: v4107 steps: - uses: actions/checkout@v4 - uses: SublimeText/syntax-test-action@v2 From 0fb999f905fe1c8866dd5274d1f3c99c0bc8331f Mon Sep 17 00:00:00 2001 From: deathaxe Date: Fri, 26 Apr 2024 19:00:13 +0200 Subject: [PATCH 9/9] Bump version 3.1.13 --- messages.json | 3 ++- messages/{next.md => 3.1.13.md} | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) rename messages/{next.md => 3.1.13.md} (92%) diff --git a/messages.json b/messages.json index b31e0c3d..9180ee9c 100644 --- a/messages.json +++ b/messages.json @@ -46,5 +46,6 @@ "3.1.9": "messages/3.1.9.md", "3.1.10": "messages/3.1.10.md", "3.1.11": "messages/3.1.11.md", - "3.1.12": "messages/3.1.12.md" + "3.1.12": "messages/3.1.12.md", + "3.1.13": "messages/3.1.13.md" } diff --git a/messages/next.md b/messages/3.1.13.md similarity index 92% rename from messages/next.md rename to messages/3.1.13.md index 825aa4b4..b69f320a 100644 --- a/messages/next.md +++ b/messages/3.1.13.md @@ -1,4 +1,4 @@ -# MarkdownEditing {version} Changelog +# MarkdownEditing 3.1.13 Changelog Your _MarkdownEditing_ plugin is updated. Enjoy new version. For any type of feedback you can use [GitHub issues][issues].