Skip to content

Commit

Permalink
[Markdown] more tests for deeply nested list items
Browse files Browse the repository at this point in the history
  • Loading branch information
keith-hall committed Feb 22, 2017
1 parent ab3355d commit 24785e6
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 2 deletions.
12 changes: 10 additions & 2 deletions Markdown/Markdown.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -546,8 +546,16 @@ contexts:
2: punctuation.definition.constant.end.markdown
pop: true
list-paragraph:
- include: indented-code-block
- include: block-quote
- match: '^(?=\s+(?![>+*\s-]))(?={{indented_code_block}})'
push:
- include: indented-code-block
- match: $
pop: true
- match: '^(?=\s+{{block_quote}})'
push:
- include: block-quote
- match: $
pop: true
- match: \s+(?=\S)
push:
- meta_scope: meta.paragraph.list.markdown
Expand Down
32 changes: 32 additions & 0 deletions Markdown/syntax_test_markdown.md
Original file line number Diff line number Diff line change
Expand Up @@ -1078,3 +1078,35 @@ text
| ^^^ markup.underline.link
| ^ punctuation.definition.link.end
| ^^^^^^^^ invalid.illegal.expected-eol

- a
- b
- c
- d
| ^ punctuation.definition.list_item
text here
| ^^^^^^^^^^ markup.list.unnumbered meta.paragraph.list - markup.raw.block

code here
| ^^^^^^^^ markup.raw.block

- e
| ^ punctuation.definition.list_item

code here

> block quote code here
| ^ markup.list.unnumbered markup.quote punctuation.definition.blockquote
| ^^^^^^^^^^^^^^^^^^^^^^ markup.list.unnumbered markup.quote markup.raw.block

> > test
| ^ markup.list.unnumbered markup.quote punctuation.definition.blockquote
| ^ markup.list.unnumbered markup.quote markup.quote punctuation.definition.blockquote - markup.raw.block

- f
| ^ markup.list.unnumbered punctuation.definition.list_item
1. test
| ^ punctuation.definition.list_item

abc
| <- meta.paragraph - markup.list

0 comments on commit 24785e6

Please sign in to comment.