You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Markdown/Markdown.sublime-syntax
+91-70Lines changed: 91 additions & 70 deletions
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,7 @@ variables:
27
27
)
28
28
[ \t]*$ # followed by any number of tabs or spaces, followed by the end of the line
29
29
)
30
-
block_quote: (?:[ ]{,3}>(?:.|$))# between 0 and 3 spaces, followed by a greater than sign, followed by any character or the end of the line
30
+
block_quote: (?:[ ]{,3}(>)[ ]?)# between 0 and 3 spaces, followed by a greater than sign, (followed by any character or the end of the line = "only care about optional space!")
31
31
atx_heading: (?:[ ]{,3}[#]{1,6}(?:[ \t]|$)) # between 0 and 3 spaces, followed 1 to 6 hashes, followed by at least one space or tab or by end of the line
32
32
atx_heading_space: (?:(?=[ \t]+#+[ \t]*$)|[ \t]+|$) # consume spaces only if heading is not empty to ensure `atx_heading_end` can fully match closing hashes
33
33
atx_heading_end: (?:[ \t]+(#+))?[ \t]*($\n?) # \n is optional so ## is matched as end punctuation in new document (at eof)
@@ -235,7 +235,7 @@ contexts:
235
235
pattern will only match stuff matched by the sub-patterns.
236
236
push:
237
237
- meta_scope: meta.block-level.markdown
238
-
- include: block-quote
238
+
- include: block-quotes
239
239
- include: ligatures
240
240
- include: indented-code-block
241
241
- include: atx-heading
@@ -388,9 +388,10 @@ contexts:
388
388
# >= >== >=== >=> >==> >===> >=< >==< >===<
389
389
- match: '<<+|<>|>>+'# << <<< <<<< <> >>>> >>> >>
390
390
391
-
block-quote:
392
-
- match: '[ ]{,3}(>)[ ]?'
393
-
comment: |
391
+
block-quotes:
392
+
# https://spec.commonmark.org/0.30/#block-quotes
393
+
- match: ^{{block_quote}}
394
+
comment: |-
394
395
We terminate the block quote when seeing an empty line, a
395
396
separator or a line with leading > characters. The latter is
0 commit comments