Skip to content

Commit 2d92bd5

Browse files
committed
Fixes the link context is not popping issue: sekogan#13
1 parent 5ed86b5 commit 2d92bd5

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

MarkdownLight.sublime-syntax

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -477,6 +477,27 @@ contexts:
477477
- include: valid_ampersand
478478
- include: valid_bracket
479479
- include: scope:text.html.basic
480+
481+
# The `url` scope is eating the whole link, therefore the contexts required to be popped form the
482+
# stack matching the end of the string will not pop because the `url` context eat everything.
483+
inline_without_url:
484+
- include: escape
485+
- include: inline_raw
486+
- include: image
487+
- include: implicit_image
488+
- include: reference_image
489+
- include: link
490+
- include: implicit_link
491+
- include: reference_link
492+
- include: email
493+
- include: bold_italic
494+
- include: bold
495+
- include: italic
496+
- include: strikethrough
497+
- include: manual_line_break
498+
- include: valid_ampersand
499+
- include: valid_bracket
500+
- include: scope:text.html.basic
480501
inline_raw:
481502
- match: (`+)(.+?)(\1)
482503
scope: markup.raw.inline.markdown
@@ -516,7 +537,7 @@ contexts:
516537
6: punctuation.definition.string.end.markdown
517538
7: punctuation.definition.metadata.markdown
518539
pop: true
519-
- include: inline
540+
- include: inline_without_url
520541
list_item:
521542
- match: '^(?=\s*([*+-]|\d+\.)[ ])'
522543
push:

0 commit comments

Comments
 (0)