Skip to content

Commit

Permalink
Merge branch 'st3-develop' into st3176
Browse files Browse the repository at this point in the history
  • Loading branch information
deathaxe committed Sep 30, 2022
2 parents 43a5f0a + bd0f068 commit 4621142
Show file tree
Hide file tree
Showing 8 changed files with 59 additions and 14 deletions.
8 changes: 4 additions & 4 deletions Default (Linux).sublime-keymap
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@

{ "keys": ["`"], "command": "insert_snippet", "args": {"contents": "`$0`"}, "context":
[
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw - markup.kbd", "match_all": true },
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - meta.code-fence - markup.raw - markup.kbd", "match_all": true },
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "preceding_text", "operator": "not_regex_contains", "operand": "[\\w`]$", "match_all": true },
Expand All @@ -134,21 +134,21 @@
},
{ "keys": ["`"], "command": "insert_snippet", "args": {"contents": "`${0:$SELECTION}`"}, "context":
[
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw - markup.kbd", "match_all": true },
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - meta.code-fence - markup.raw - markup.kbd", "match_all": true },
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }
]
},
{ "keys": ["`"], "command": "move", "args": {"by": "characters", "forward": true}, "context":
[
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw - markup.kbd", "match_all": true },
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown markup.raw - meta.code-fence - markup.raw.code-fence", "match_all": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^`", "match_all": true }
]
},
{ "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "Packages/Default/Delete Left Right.sublime-macro"}, "context":
[
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw - markup.kbd", "match_all": true },
{ "key": "selector", "operator": "equal", "operand": "punctuation.definition.raw.begin.markdown", "match_all": true },
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "preceding_text", "operator": "regex_contains", "operand": "`$", "match_all": true },
Expand Down
8 changes: 4 additions & 4 deletions Default (OSX).sublime-keymap
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@

{ "keys": ["`"], "command": "insert_snippet", "args": {"contents": "`$0`"}, "context":
[
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw - markup.kbd", "match_all": true },
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - meta.code-fence - markup.raw - markup.kbd", "match_all": true },
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "preceding_text", "operator": "not_regex_contains", "operand": "[\\w`]$", "match_all": true },
Expand All @@ -134,21 +134,21 @@
},
{ "keys": ["`"], "command": "insert_snippet", "args": {"contents": "`${0:$SELECTION}`"}, "context":
[
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw - markup.kbd", "match_all": true },
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - meta.code-fence - markup.raw - markup.kbd", "match_all": true },
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }
]
},
{ "keys": ["`"], "command": "move", "args": {"by": "characters", "forward": true}, "context":
[
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw - markup.kbd", "match_all": true },
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown markup.raw - meta.code-fence - markup.raw.code-fence", "match_all": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^`", "match_all": true }
]
},
{ "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "Packages/Default/Delete Left Right.sublime-macro"}, "context":
[
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw - markup.kbd", "match_all": true },
{ "key": "selector", "operator": "equal", "operand": "punctuation.definition.raw.begin.markdown", "match_all": true },
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "preceding_text", "operator": "regex_contains", "operand": "`$", "match_all": true },
Expand Down
8 changes: 4 additions & 4 deletions Default (Windows).sublime-keymap
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@

{ "keys": ["`"], "command": "insert_snippet", "args": {"contents": "`$0`"}, "context":
[
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw - markup.kbd", "match_all": true },
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - meta.code-fence - markup.raw - markup.kbd", "match_all": true },
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "preceding_text", "operator": "not_regex_contains", "operand": "[\\w`]$", "match_all": true },
Expand All @@ -134,21 +134,21 @@
},
{ "keys": ["`"], "command": "insert_snippet", "args": {"contents": "`${0:$SELECTION}`"}, "context":
[
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw - markup.kbd", "match_all": true },
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - meta.code-fence - markup.raw - markup.kbd", "match_all": true },
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }
]
},
{ "keys": ["`"], "command": "move", "args": {"by": "characters", "forward": true}, "context":
[
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw - markup.kbd", "match_all": true },
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown markup.raw - meta.code-fence - markup.raw.code-fence", "match_all": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^`", "match_all": true }
]
},
{ "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "Packages/Default/Delete Left Right.sublime-macro"}, "context":
[
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw - markup.kbd", "match_all": true },
{ "key": "selector", "operator": "equal", "operand": "punctuation.definition.raw.begin.markdown", "match_all": true },
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "preceding_text", "operator": "regex_contains", "operand": "`$", "match_all": true },
Expand Down
3 changes: 2 additions & 1 deletion messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,6 @@
"3.1.2": "messages/3.1.2.md",
"3.1.3": "messages/3.1.3.md",
"3.1.4": "messages/3.1.4.md",
"3.1.5": "messages/3.1.5.md"
"3.1.5": "messages/3.1.5.md",
"3.1.6": "messages/3.1.6.md"
}
17 changes: 17 additions & 0 deletions messages/3.1.6.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# MarkdownEditing 3.1.6 Changelog

Your _MarkdownEditing_ plugin is updated. Enjoy new version. For any type of
feedback you can use [GitHub issues][issues].

## Bug Fixes

* Respect `set_unsaved_view_name` setting (#704)
* Fix `markup.raw` auto-pairing key bindings (#707)

## New Features

* Add support for Makefile syntax in fenced code blocks

## Changes

[issues]: https://github.com/SublimeText-Markdown/MarkdownEditing/issues
2 changes: 1 addition & 1 deletion plugins/headings/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class MdeUnsavedViewNameSetter(MdeViewEventListener):
MAX_NAME = 50

def on_modified(self):
if self.view.file_name() is not None:
if self.view.file_name() is not None or not self.view.settings().get("set_unsaved_view_name"):
return

name = first_heading_text(self.view)
Expand Down
20 changes: 20 additions & 0 deletions syntaxes/Markdown.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -915,6 +915,7 @@ contexts:
- include: fenced-jsx
- include: fenced-lisp
- include: fenced-lua
- include: fenced-makefile
- include: fenced-matlab
- include: fenced-objc
- include: fenced-objcpp
Expand Down Expand Up @@ -1342,6 +1343,25 @@ contexts:
0: meta.code-fence.definition.end.lua.markdown-gfm
1: punctuation.definition.raw.code-fence.end.markdown
fenced-makefile:
- match: |-
(?x)
{{fenced_code_block_start}}
((?i:makefile))
{{fenced_code_block_trailing_infostring_characters}}
captures:
0: meta.code-fence.definition.begin.markdown-gfm
2: punctuation.definition.raw.code-fence.begin.markdown
5: constant.other.language-name.markdown
embed: scope:source.makefile
embed_scope:
markup.raw.code-fence.makefile.markdown-gfm
source.makefile
escape: '{{fenced_code_block_escape}}'
escape_captures:
0: meta.code-fence.definition.end.markdown-gfm
1: punctuation.definition.raw.code-fence.end.markdown
fenced-matlab:
- match: |-
(?x)
Expand Down
7 changes: 7 additions & 0 deletions tests/syntax_test_markdown.md
Original file line number Diff line number Diff line change
Expand Up @@ -1633,6 +1633,13 @@ for (var i = 0; i < 10; i++) {
| <- meta.code-fence.definition.end.lua.markdown-gfm punctuation.definition.raw.code-fence.end.markdown
|^^ meta.code-fence.definition.end.lua.markdown-gfm punctuation.definition.raw.code-fence.end.markdown

```makefile

| <- markup.raw.code-fence.makefile.markdown-gfm source.makefile
```
| <- meta.code-fence.definition.end.markdown-gfm punctuation.definition.raw.code-fence.end.markdown
|^^ meta.code-fence.definition.end.markdown-gfm punctuation.definition.raw.code-fence.end.markdown

```matlab
| <- markup.raw.code-fence.matlab.markdown-gfm source.matlab
Expand Down

0 comments on commit 4621142

Please sign in to comment.