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 78% rename from messages/next.md rename to messages/3.1.13.md index b6173b75..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]. @@ -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 d47db10d..acc59671 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 version: 2 hidden: true @@ -3135,14 +3135,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 671de583..0574821c 100644 --- a/tests/syntax_test_markdown.md +++ b/tests/syntax_test_markdown.md @@ -3178,8 +3178,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 @@ -3248,8 +3249,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