Skip to content

Commit

Permalink
Merge branch 'st3-develop' into st4-develop
Browse files Browse the repository at this point in the history
  • Loading branch information
deathaxe committed Feb 20, 2022
2 parents 1ebabea + c3169b4 commit e4509eb
Show file tree
Hide file tree
Showing 10 changed files with 97 additions and 12 deletions.
3 changes: 2 additions & 1 deletion messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,6 @@
"3.0.6": "messages/3.0.6.md",
"3.0.7": "messages/3.0.7.md",
"3.1.0": "messages/3.1.0.md",
"3.1.1": "messages/3.1.1.md"
"3.1.1": "messages/3.1.1.md",
"3.1.2": "messages/3.1.2.md"
}
16 changes: 16 additions & 0 deletions messages/3.1.2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# MarkdownEditing 3.1.2 Changelog

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

## Bug Fixes

* fix strikethrough visibility with `line_highlight`
* don't add symbols of fenced code blocks to symbol list
* fix interactive shell highlighting in fenced code blocks

## New Features

## Changes

[issues]: https://github.com/SublimeText-Markdown/MarkdownEditing/issues
1 change: 0 additions & 1 deletion plugins/references.py
Original file line number Diff line number Diff line change
Expand Up @@ -932,7 +932,6 @@ def on_query_completions(self, _, locations):
sublime.INHIBIT_WORD_COMPLETIONS | sublime.INHIBIT_EXPLICIT_COMPLETIONS,
)


else:

class MdeReferenceCompletionsProvider(MdeViewEventListener):
Expand Down
2 changes: 1 addition & 1 deletion schemes/Mariana.sublime-color-scheme
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
{
"name": "Markdown: Striked Punctuations",
"scope": "text.html.markdown markup.strikethrough & (punctuation.definition | punctuation.separator | punctuation.definition.strikethrough | punctuation.definition.constant | punctuation.definition.image | punctuation.definition.link | punctuation.definition.metadata | markup.bold punctuation.definition.bold | markup.italic punctuation.definition.italic | string punctuation.definition.string)",
"foreground": "var(blue2)",
"foreground": "var(blue6)",
"font_style": ""
},
{
Expand Down
6 changes: 3 additions & 3 deletions schemes/Monokai.sublime-color-scheme
Original file line number Diff line number Diff line change
Expand Up @@ -57,19 +57,19 @@
{
"name": "Markdown: Striked Content",
"scope": "text.html.markdown markup.strikethrough, text.html.markdown markup.strikethrough string",
"foreground": "var(grey)",
"foreground": "var(yellow5)",
"font_style": ""
},
{
"name": "Markdown: Striked Punctuations",
"scope": "text.html.markdown markup.strikethrough & (punctuation.definition | punctuation.separator | punctuation.definition.strikethrough | punctuation.definition.constant | punctuation.definition.image | punctuation.definition.link | punctuation.definition.metadata | punctuation.definition.bold | punctuation.definition.italic | punctuation.definition.string)",
"foreground": "var(grey)",
"foreground": "var(yellow5)",
"font_style": ""
},
{
"name": "Markdown: Striked URLs",
"scope": "text.html.markdown markup.strikethrough & (markup.underline.link.markdown | markup.underline.link.image.markdown)",
"foreground": "var(grey)"
"foreground": "var(yellow5)",
},
{
"name": "Markdown: Hard Line Breaks",
Expand Down
20 changes: 19 additions & 1 deletion syntaxes/Markdown.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -933,6 +933,7 @@ contexts:
- include: fenced-ruby
- include: fenced-rust
- include: fenced-scala
- include: fenced-shell
- include: fenced-shell-script
- include: fenced-sql
- include: fenced-tsx
Expand Down Expand Up @@ -1550,11 +1551,28 @@ contexts:
0: meta.code-fence.definition.end.scala.markdown-gfm
1: punctuation.definition.raw.code-fence.end.markdown
fenced-shell:
- match: |-
(?x)
{{fenced_code_block_start}}
((?i:console|shell))
{{fenced_code_block_trailing_infostring_characters}}
captures:
0: meta.code-fence.definition.begin.shell.markdown-gfm
2: punctuation.definition.raw.code-fence.begin.markdown
5: constant.other.language-name.markdown
embed: scope:source.shell.interactive.markdown
embed_scope: markup.raw.code-fence.shell.markdown-gfm
escape: '{{fenced_code_block_escape}}'
escape_captures:
0: meta.code-fence.definition.end.shell.markdown-gfm
1: punctuation.definition.raw.code-fence.end.markdown
fenced-shell-script:
- match: |-
(?x)
{{fenced_code_block_start}}
((?i:console|shell(?:-script)?|sh|bash|zsh))
((?i:shell-script|sh|bash|zsh))
{{fenced_code_block_trailing_infostring_characters}}
captures:
0: meta.code-fence.definition.begin.shell-script.markdown-gfm
Expand Down
25 changes: 25 additions & 0 deletions syntaxes/Shell (for Markdown).sublime-syntax
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
%YAML 1.2
---
name: Interactive Unix Shell
scope: source.shell.interactive.markdown
hidden: true

contexts:
main:
- match: ^(?=\$\s)
push: shell-interactive
- include: shell-statements

shell-interactive:
- match: ^\$(?=\s)
scope: comment.other.shell
push: shell-statements
with_prototype:
# continuation lines begin with `> `
- match: ^>(?=\s)
scope: comment.other.shell
- match: ^
pop: true

shell-statements:
- include: scope:source.shell
2 changes: 1 addition & 1 deletion syntaxes/Symbol List - Hide.tmPreferences
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>scope</key>
<string>text.html.markdown markup.raw.block.fenced.markdown, text.html.markdown meta.toc-list.id</string>
<string>text.html.markdown markup.raw.code-fence, text.html.markdown meta.toc-list.id</string>
<key>settings</key>
<dict>
<key>showInSymbolList</key>
Expand Down
2 changes: 1 addition & 1 deletion tests/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ mccabe == 0.6.1 ; python_version == '3.8'
pycodestyle == 2.7.0 ; python_version == '3.8'
pyflakes == 2.3.1 ; python_version == '3.8'
flake8 == 3.9.2 ; python_version == '3.8'
black == 21.5b1 ; python_version == '3.8'
black == 22.1.0 ; python_version == '3.8'
32 changes: 29 additions & 3 deletions tests/syntax_test_markdown.md
Original file line number Diff line number Diff line change
Expand Up @@ -1933,11 +1933,37 @@ unclosed_paren = (
|^^ meta.code-fence.definition.end.shell-script.markdown-gfm punctuation.definition.raw.code-fence.end.markdown

```shell
function foo () {
| <- markup.raw.code-fence.shell.markdown-gfm source.shell.interactive.markdown meta.function.shell storage.type
}
| <- markup.raw.code-fence.shell.markdown-gfm source.shell.interactive.markdown meta.function.shell punctuation.section

| <- markup.raw.code-fence.shell-script.markdown-gfm source.shell.bash
$ ls ~
| <- markup.raw.code-fence.shell.markdown-gfm source.shell.interactive comment.other.shell
| ^^ meta.function-call.shell variable.function.shell
| ^^ meta.function-call.arguments.shell

output.txt
| <- markup.raw.code-fence.shell.markdown-gfm source.shell.interactive - meta.function-call - variable
|^^^^^^^^^ markup.raw.code-fence.shell.markdown-gfm source.shell.interactive - meta.function-call - variable

$ ls \
> /foo/
| <- markup.raw.code-fence.shell.markdown-gfm source.shell.interactive.markdown comment.other.shell
|^^^^^^^ markup.raw.code-fence.shell.markdown-gfm source.shell.interactive.markdown

$ ls \
> /foo/
bar
| <- markup.raw.code-fence.shell.markdown-gfm source.shell.interactive.markdown - meta.function-call
|^^^ markup.raw.code-fence.shell.markdown-gfm source.shell.interactive.markdown - meta.function-call

function foo () {}
| <- markup.raw.code-fence.shell.markdown-gfm source.shell.interactive.markdown - meta.function
|^^^^^^^^^^^^^^^^^^ markup.raw.code-fence.shell.markdown-gfm source.shell.interactive.markdown - meta.function
```
| <- meta.code-fence.definition.end.shell-script.markdown-gfm punctuation.definition.raw.code-fence.end.markdown
|^^ meta.code-fence.definition.end.shell-script.markdown-gfm punctuation.definition.raw.code-fence.end.markdown
| <- meta.code-fence.definition.end.shell.markdown-gfm punctuation.definition.raw.code-fence.end.markdown
|^^ meta.code-fence.definition.end.shell.markdown-gfm punctuation.definition.raw.code-fence.end.markdown

```shell-script

Expand Down

0 comments on commit e4509eb

Please sign in to comment.