Skip to content

Commit 34977f6

Browse files
committed
Merge branch 'st3-develop' into st4-develop
2 parents 704a534 + bd0f068 commit 34977f6

8 files changed

Lines changed: 59 additions & 14 deletions

File tree

Default (Linux).sublime-keymap

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@
125125

126126
{ "keys": ["`"], "command": "insert_snippet", "args": {"contents": "`$0`"}, "context":
127127
[
128-
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw - markup.kbd", "match_all": true },
128+
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - meta.code-fence - markup.raw - markup.kbd", "match_all": true },
129129
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
130130
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
131131
{ "key": "preceding_text", "operator": "not_regex_contains", "operand": "[\\w`]$", "match_all": true },
@@ -134,21 +134,21 @@
134134
},
135135
{ "keys": ["`"], "command": "insert_snippet", "args": {"contents": "`${0:$SELECTION}`"}, "context":
136136
[
137-
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw - markup.kbd", "match_all": true },
137+
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - meta.code-fence - markup.raw - markup.kbd", "match_all": true },
138138
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
139139
{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }
140140
]
141141
},
142142
{ "keys": ["`"], "command": "move", "args": {"by": "characters", "forward": true}, "context":
143143
[
144-
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw - markup.kbd", "match_all": true },
144+
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown markup.raw - meta.code-fence - markup.raw.code-fence", "match_all": true },
145145
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
146146
{ "key": "following_text", "operator": "regex_contains", "operand": "^`", "match_all": true }
147147
]
148148
},
149149
{ "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "Packages/Default/Delete Left Right.sublime-macro"}, "context":
150150
[
151-
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw - markup.kbd", "match_all": true },
151+
{ "key": "selector", "operator": "equal", "operand": "punctuation.definition.raw.begin.markdown", "match_all": true },
152152
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
153153
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
154154
{ "key": "preceding_text", "operator": "regex_contains", "operand": "`$", "match_all": true },

Default (OSX).sublime-keymap

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@
125125

126126
{ "keys": ["`"], "command": "insert_snippet", "args": {"contents": "`$0`"}, "context":
127127
[
128-
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw - markup.kbd", "match_all": true },
128+
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - meta.code-fence - markup.raw - markup.kbd", "match_all": true },
129129
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
130130
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
131131
{ "key": "preceding_text", "operator": "not_regex_contains", "operand": "[\\w`]$", "match_all": true },
@@ -134,21 +134,21 @@
134134
},
135135
{ "keys": ["`"], "command": "insert_snippet", "args": {"contents": "`${0:$SELECTION}`"}, "context":
136136
[
137-
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw - markup.kbd", "match_all": true },
137+
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - meta.code-fence - markup.raw - markup.kbd", "match_all": true },
138138
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
139139
{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }
140140
]
141141
},
142142
{ "keys": ["`"], "command": "move", "args": {"by": "characters", "forward": true}, "context":
143143
[
144-
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw - markup.kbd", "match_all": true },
144+
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown markup.raw - meta.code-fence - markup.raw.code-fence", "match_all": true },
145145
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
146146
{ "key": "following_text", "operator": "regex_contains", "operand": "^`", "match_all": true }
147147
]
148148
},
149149
{ "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "Packages/Default/Delete Left Right.sublime-macro"}, "context":
150150
[
151-
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw - markup.kbd", "match_all": true },
151+
{ "key": "selector", "operator": "equal", "operand": "punctuation.definition.raw.begin.markdown", "match_all": true },
152152
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
153153
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
154154
{ "key": "preceding_text", "operator": "regex_contains", "operand": "`$", "match_all": true },

Default (Windows).sublime-keymap

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@
125125

126126
{ "keys": ["`"], "command": "insert_snippet", "args": {"contents": "`$0`"}, "context":
127127
[
128-
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw - markup.kbd", "match_all": true },
128+
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - meta.code-fence - markup.raw - markup.kbd", "match_all": true },
129129
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
130130
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
131131
{ "key": "preceding_text", "operator": "not_regex_contains", "operand": "[\\w`]$", "match_all": true },
@@ -134,21 +134,21 @@
134134
},
135135
{ "keys": ["`"], "command": "insert_snippet", "args": {"contents": "`${0:$SELECTION}`"}, "context":
136136
[
137-
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw - markup.kbd", "match_all": true },
137+
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - meta.code-fence - markup.raw - markup.kbd", "match_all": true },
138138
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
139139
{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }
140140
]
141141
},
142142
{ "keys": ["`"], "command": "move", "args": {"by": "characters", "forward": true}, "context":
143143
[
144-
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw - markup.kbd", "match_all": true },
144+
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown markup.raw - meta.code-fence - markup.raw.code-fence", "match_all": true },
145145
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
146146
{ "key": "following_text", "operator": "regex_contains", "operand": "^`", "match_all": true }
147147
]
148148
},
149149
{ "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "Packages/Default/Delete Left Right.sublime-macro"}, "context":
150150
[
151-
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw - markup.kbd", "match_all": true },
151+
{ "key": "selector", "operator": "equal", "operand": "punctuation.definition.raw.begin.markdown", "match_all": true },
152152
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
153153
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
154154
{ "key": "preceding_text", "operator": "regex_contains", "operand": "`$", "match_all": true },

messages.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,6 @@
3939
"3.1.2": "messages/3.1.2.md",
4040
"3.1.3": "messages/3.1.3.md",
4141
"3.1.4": "messages/3.1.4.md",
42-
"3.1.5": "messages/3.1.5.md"
42+
"3.1.5": "messages/3.1.5.md",
43+
"3.1.6": "messages/3.1.6.md"
4344
}

messages/3.1.6.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# MarkdownEditing 3.1.6 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+
* Respect `set_unsaved_view_name` setting (#704)
9+
* Fix `markup.raw` auto-pairing key bindings (#707)
10+
11+
## New Features
12+
13+
* Add support for Makefile syntax in fenced code blocks
14+
15+
## Changes
16+
17+
[issues]: https://github.com/SublimeText-Markdown/MarkdownEditing/issues

plugins/headings/common.py

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

5959
def on_modified(self):
60-
if self.view.file_name() is not None:
60+
if self.view.file_name() is not None or not self.view.settings().get("set_unsaved_view_name"):
6161
return
6262

6363
name = first_heading_text(self.view)

syntaxes/Markdown.sublime-syntax

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -983,6 +983,7 @@ contexts:
983983
- include: fenced-jsx
984984
- include: fenced-lisp
985985
- include: fenced-lua
986+
- include: fenced-makefile
986987
- include: fenced-matlab
987988
- include: fenced-objc
988989
- include: fenced-objcpp
@@ -1454,6 +1455,25 @@ contexts:
14541455
0: meta.code-fence.definition.end.lua.markdown-gfm
14551456
1: punctuation.definition.raw.code-fence.end.markdown
14561457
1458+
fenced-makefile:
1459+
- match: |-
1460+
(?x)
1461+
{{fenced_code_block_start}}
1462+
((?i:makefile))
1463+
{{fenced_code_block_trailing_infostring_characters}}
1464+
captures:
1465+
0: meta.code-fence.definition.begin.markdown-gfm
1466+
2: punctuation.definition.raw.code-fence.begin.markdown
1467+
5: constant.other.language-name.markdown
1468+
embed: scope:source.makefile
1469+
embed_scope:
1470+
markup.raw.code-fence.makefile.markdown-gfm
1471+
source.makefile
1472+
escape: '{{fenced_code_block_escape}}'
1473+
escape_captures:
1474+
0: meta.code-fence.definition.end.markdown-gfm
1475+
1: punctuation.definition.raw.code-fence.end.markdown
1476+
14571477
fenced-matlab:
14581478
- match: |-
14591479
(?x)

tests/syntax_test_markdown.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1876,6 +1876,13 @@ for (var i = 0; i < 10; i++) {
18761876
| <- meta.code-fence.definition.end.lua.markdown-gfm punctuation.definition.raw.code-fence.end.markdown
18771877
|^^ meta.code-fence.definition.end.lua.markdown-gfm punctuation.definition.raw.code-fence.end.markdown
18781878

1879+
```makefile
1880+
1881+
| <- markup.raw.code-fence.makefile.markdown-gfm source.makefile
1882+
```
1883+
| <- meta.code-fence.definition.end.markdown-gfm punctuation.definition.raw.code-fence.end.markdown
1884+
|^^ meta.code-fence.definition.end.markdown-gfm punctuation.definition.raw.code-fence.end.markdown
1885+
18791886
```matlab
18801887
18811888
| <- markup.raw.code-fence.matlab.markdown-gfm source.matlab

0 commit comments

Comments
 (0)