Skip to content

Commit bff21d0

Browse files
committed
Merge branch 'st4-develop'
2 parents a2a58e3 + cf00a5b commit bff21d0

File tree

7 files changed

+308
-123
lines changed

7 files changed

+308
-123
lines changed

messages.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,6 @@
4141
"3.1.4": "messages/3.1.4.md",
4242
"3.1.5": "messages/3.1.5.md",
4343
"3.1.6": "messages/3.1.6.md",
44-
"3.1.7": "messages/3.1.7.md"
44+
"3.1.7": "messages/3.1.7.md",
45+
"3.1.8": "messages/3.1.8.md"
4546
}

messages/3.1.8.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# MarkdownEditing 3.1.8 Changelog
2+
3+
Your _MarkdownEditing_ plugin is updated. Enjoy new version. For any type of
4+
feedback you can use [GitHub issues][issues].
5+
6+
## Bug Fixes
7+
8+
* Fix GFM auto-link termination
9+
* Fix inline raw code spans highlighting
10+
* Fix stealing focus of Goto Anything Quick Panel (#710)
11+
* Add support for pandoc attributes in reference definitions (#712)
12+
13+
## New Features
14+
15+
## Changes
16+
17+
[issues]: https://github.com/SublimeText-Markdown/MarkdownEditing/issues

plugins/bootstrap.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,8 @@ def on_after_install():
102102

103103
def async_worker():
104104
bootstrap_syntax_assignments()
105-
disable_native_markdown_package()
105+
if int(sublime.version()) < 4132:
106+
disable_native_markdown_package()
106107
clear_invalid_color_schemes()
107108
# Update bootstrap cookie.
108109
open(bootstrapped, "w").write(BOOTSTRAP_VERSION)

plugins/headings/common.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@ class MdeUnsavedViewNameSetter(MdeViewEventListener):
5757
MAX_NAME = 50
5858

5959
def on_modified(self):
60-
if self.view.file_name() is not None or not self.view.settings().get("set_unsaved_view_name", True):
60+
if self.view.file_name() is not None or not self.view.settings().get(
61+
"set_unsaved_view_name", True
62+
):
6163
return
6264

6365
name = first_heading_text(self.view)

plugins/headings/style.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ def on_load(self):
6666

6767
def on_pre_save(self):
6868
self.auto_detect_heading_style()
69+
if self.view.settings().get("mde.auto_match_heading_hashes", False):
70+
self.view.run_command("mde_match_heading_hashes")
6971

7072
def auto_detect_heading_style(self):
7173
view = self.view
@@ -86,6 +88,3 @@ def auto_detect_heading_style(self):
8688
view.settings().set("mde.match_heading_hashes", num_trailing / num_leading > 0.5)
8789
else:
8890
view.settings().erase("mde.match_heading_hashes")
89-
90-
if view.settings().get("mde.auto_match_heading_hashes", False):
91-
view.run_command("mde_match_heading_hashes")

syntaxes/Markdown.sublime-syntax

Lines changed: 43 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2654,25 +2654,44 @@ contexts:
26542654
3: punctuation.definition.reference.end.markdown
26552655
4: punctuation.separator.key-value.markdown
26562656
push:
2657-
- link-def-end
2657+
- link-def-meta
2658+
- link-def-attr
26582659
- link-def-title
26592660
- link-def-url
26602661

2661-
link-def-end:
2662+
link-def-meta:
26622663
- meta_include_prototype: false
26632664
- meta_scope: meta.link.reference.def.markdown
26642665
- include: immediately-pop
26652666

2667+
link-def-attr:
2668+
- match: \{
2669+
scope: punctuation.definition.attributes.begin.markdown
2670+
set: link-def-attr-body
2671+
- match: ^(?!\s*{)|(?=\S)
2672+
pop: true
2673+
2674+
link-def-attr-body:
2675+
- meta_scope: meta.attributes.markdown
2676+
- include: tag-attributes
2677+
26662678
link-def-title:
26672679
- match: ^(?!\s*["'(])
26682680
pop: 1
26692681
- match: (?=["'(])
26702682
set:
2671-
- expect-eol
2683+
- expect-attr-or-eol
26722684
- link-title
2685+
- match: (?=\{)
2686+
pop: true
26732687
- match: \S.+
26742688
scope: invalid.illegal.expected-eol.markdown
26752689

2690+
expect-attr-or-eol:
2691+
- match: (?=\{)
2692+
pop: true
2693+
- include: expect-eol
2694+
26762695
link-def-url:
26772696
- match: <
26782697
scope: punctuation.definition.link.begin.markdown
@@ -2821,20 +2840,29 @@ contexts:
28212840

28222841
code-spans:
28232842
# https://spec.commonmark.org/0.30/#code-spans
2824-
- match: (`+)(?!`)
2843+
- match: (?=`+)
2844+
branch_point: code-spans
2845+
branch:
2846+
- code-span
2847+
- no-code-span
2848+
2849+
code-span:
2850+
- match: (`+)
28252851
scope: punctuation.definition.raw.begin.markdown
2826-
push: code-span-body
2852+
set: code-span-body
28272853

28282854
code-span-body:
28292855
- meta_scope: markup.raw.inline.markdown
28302856
- match: \1(?!`)
28312857
scope: punctuation.definition.raw.end.markdown
28322858
pop: 1
2833-
- match: '`+'
2834-
- match: ^\s*$\n?
2835-
scope: invalid.illegal.non-terminated.raw.markdown
2859+
- match: \`+
2860+
- match: '{{list_paragraph_end}}'
2861+
fail: code-spans
2862+
2863+
no-code-span:
2864+
- match: \`+
28362865
pop: 1
2837-
- include: paragraph-end
28382866

28392867
###[ INLINE: EMPHASIS ]#######################################################
28402868

@@ -3429,6 +3457,7 @@ contexts:
34293457
scope: invalid.illegal.attribute-name.markdown
34303458

34313459
tag-attr-meta:
3460+
- meta_include_prototype: false
34323461
- meta_scope: meta.attribute-with-value.markdown
34333462
- include: immediately-pop
34343463

@@ -3506,6 +3535,7 @@ contexts:
35063535
- link-url-scheme-separator
35073536
# Github Flavoured Markdown
35083537
# After a valid domain, zero or more non-space non-< characters may follow
3538+
# https://github.github.com/gfm/#autolinks-extension-
35093539
- match: (?:(?:https|http|ftp)(://)|www\.)[\w-]+
35103540
captures:
35113541
1: punctuation.separator.path.markdown
@@ -3534,14 +3564,15 @@ contexts:
35343564
# 3. Trailing punctuation (specifically, ?, !, ., ,, :, *, _, and ~) will not
35353565
# be considered part of the autolink, though they may be included in the
35363566
# interior # of the link
3537-
- match: (?=(?:\)|(?:{{html_entity}})*)[?!.,:*_~]*[\s<])
3567+
# Note: contains some empirical (undocumented) punctuation such as ;, ', "
3568+
- match: (?=(?:\)|(?:{{html_entity}})*)[?!.,:;*_~'"]*[\s<])
35383569
pop: 1
35393570
- include: autolink-inet-common
35403571

35413572
autolink-inet-group:
35423573
- match: \)
3543-
pop: 1
3544-
- match: (?=(?:{{html_entity}})*[?!.,:*_~]*[\s<])
3574+
pop: true
3575+
- match: (?=(?:{{html_entity}})*[?!.,:;*_~'"]*[\s<])
35453576
pop: 1
35463577
- include: autolink-inet-common
35473578

0 commit comments

Comments
 (0)