Skip to content

Commit 4621142

Browse files
committed
Merge branch 'st3-develop' into st3176
2 parents 43a5f0a + bd0f068 commit 4621142

File tree

8 files changed

+59
-14
lines changed

8 files changed

+59
-14
lines changed

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
@@ -915,6 +915,7 @@ contexts:
915915
- include: fenced-jsx
916916
- include: fenced-lisp
917917
- include: fenced-lua
918+
- include: fenced-makefile
918919
- include: fenced-matlab
919920
- include: fenced-objc
920921
- include: fenced-objcpp
@@ -1342,6 +1343,25 @@ contexts:
13421343
0: meta.code-fence.definition.end.lua.markdown-gfm
13431344
1: punctuation.definition.raw.code-fence.end.markdown
13441345
1346+
fenced-makefile:
1347+
- match: |-
1348+
(?x)
1349+
{{fenced_code_block_start}}
1350+
((?i:makefile))
1351+
{{fenced_code_block_trailing_infostring_characters}}
1352+
captures:
1353+
0: meta.code-fence.definition.begin.markdown-gfm
1354+
2: punctuation.definition.raw.code-fence.begin.markdown
1355+
5: constant.other.language-name.markdown
1356+
embed: scope:source.makefile
1357+
embed_scope:
1358+
markup.raw.code-fence.makefile.markdown-gfm
1359+
source.makefile
1360+
escape: '{{fenced_code_block_escape}}'
1361+
escape_captures:
1362+
0: meta.code-fence.definition.end.markdown-gfm
1363+
1: punctuation.definition.raw.code-fence.end.markdown
1364+
13451365
fenced-matlab:
13461366
- match: |-
13471367
(?x)

tests/syntax_test_markdown.md

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

1636+
```makefile
1637+
1638+
| <- markup.raw.code-fence.makefile.markdown-gfm source.makefile
1639+
```
1640+
| <- meta.code-fence.definition.end.markdown-gfm punctuation.definition.raw.code-fence.end.markdown
1641+
|^^ meta.code-fence.definition.end.markdown-gfm punctuation.definition.raw.code-fence.end.markdown
1642+
16361643
```matlab
16371644
16381645
| <- markup.raw.code-fence.matlab.markdown-gfm source.matlab

0 commit comments

Comments
 (0)