diff --git a/Markdown/Markdown.sublime-syntax b/Markdown/Markdown.sublime-syntax index 813a3311f0..b3f7395564 100644 --- a/Markdown/Markdown.sublime-syntax +++ b/Markdown/Markdown.sublime-syntax @@ -363,7 +363,6 @@ contexts: push: - block-quote-caution-meta - block-quote-body - - block-quote-punctuation-body - match: '[ \t]{,3}(>)[ ]?((\[)!WARNING(\]))' captures: 1: punctuation.definition.blockquote.markdown @@ -373,7 +372,6 @@ contexts: push: - block-quote-warning-meta - block-quote-body - - block-quote-punctuation-body - match: '[ \t]{,3}(>)[ ]?((\[)!IMPORTANT(\]))' captures: 1: punctuation.definition.blockquote.markdown @@ -383,7 +381,6 @@ contexts: push: - block-quote-important-meta - block-quote-body - - block-quote-punctuation-body - match: '[ \t]{,3}(>)[ ]?((\[)!NOTE(\]))' captures: 1: punctuation.definition.blockquote.markdown @@ -393,7 +390,6 @@ contexts: push: - block-quote-note-meta - block-quote-body - - block-quote-punctuation-body - match: '[ \t]{,3}(>)[ ]?((\[)!TIP(\]))' captures: 1: punctuation.definition.blockquote.markdown @@ -403,7 +399,6 @@ contexts: push: - block-quote-tip-meta - block-quote-body - - block-quote-punctuation-body - match: '[ \t]{,3}(>)[ ]?' captures: 1: punctuation.definition.blockquote.markdown @@ -631,14 +626,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 @@ -697,7 +692,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 @@ -793,7 +788,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 @@ -803,7 +797,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 @@ -813,7 +806,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 @@ -823,7 +815,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 @@ -833,7 +824,6 @@ contexts: push: - block-quote-tip-meta - list-block-quote-body - - block-quote-punctuation-body - match: '[ \t]*(>)[ ]?' captures: 1: punctuation.definition.blockquote.markdown @@ -860,7 +850,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/Markdown/tests/syntax_test_markdown.md b/Markdown/tests/syntax_test_markdown.md index 1ee76c2530..63d2eede3e 100644 --- a/Markdown/tests/syntax_test_markdown.md +++ b/Markdown/tests/syntax_test_markdown.md @@ -8209,6 +8209,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 @@ -8281,6 +8341,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