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 May 6, 2022
2 parents 513d2a1 + 0c8d7f5 commit 2f1c5b7
Show file tree
Hide file tree
Showing 15 changed files with 189 additions and 18 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"
}
18 changes: 18 additions & 0 deletions messages/3.1.2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# 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

* MardownEditings color schemes now underline link urls (fixes #685)

[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
17 changes: 16 additions & 1 deletion schemes/MarkdownEditor-ArcDark.sublime-color-scheme
Original file line number Diff line number Diff line change
Expand Up @@ -265,9 +265,19 @@
"scope": "markup.underline.link, constant.other.reference.link",
"foreground": "#555555"
},
{
"name": "Markdown: Link URL Separators",
"scope": "markup.underline.link punctuation.separator",
"foreground": "#555555"
},
{
"name": "Markup: Plain Link",
"scope": "meta.link.inet markup.underline.link, meta.link.email.lt-gt markup.underline.link",
"scope": "meta.link.inet markup.underline.link, meta.link.email markup.underline.link",
"foreground": "#bbbb77"
},
{
"name": "Markdown: Plain Link Separators",
"scope": "meta.link.inet markup.underline.link punctuation.separator, meta.link.email markup.underline.link punctuation.separator",
"foreground": "#bbbb77"
},
{
Expand Down Expand Up @@ -350,6 +360,11 @@
"scope": "markup.strikethrough markup.kbd.content",
"foreground": "#484848"
},
{
"name": "Markdown: Underline",
"scope": "markup.underline",
"font_style": "underline"
},

//
// Markups
Expand Down
17 changes: 16 additions & 1 deletion schemes/MarkdownEditor-Dark.sublime-color-scheme
Original file line number Diff line number Diff line change
Expand Up @@ -273,9 +273,19 @@
"foreground": "#555555",
"background": "#171717"
},
{
"name": "Markdown: Link URL Separators",
"scope": "markup.underline.link punctuation.separator",
"foreground": "#555555"
},
{
"name": "Markdown: Plain Link",
"scope": "meta.link.inet markup.underline.link, meta.link.email.lt-gt markup.underline.link",
"scope": "meta.link.inet markup.underline.link, meta.link.email markup.underline.link",
"foreground": "#bbbb77"
},
{
"name": "Markdown: Plain Link Separators",
"scope": "meta.link.inet markup.underline.link punctuation.separator, meta.link.email markup.underline.link punctuation.separator",
"foreground": "#bbbb77"
},
{
Expand Down Expand Up @@ -362,6 +372,11 @@
"foreground": "#484848",
"background": "#222222"
},
{
"name": "Markdown: Underline",
"scope": "markup.underline",
"font_style": "underline"
},

//
// Markups
Expand Down
17 changes: 16 additions & 1 deletion schemes/MarkdownEditor-Focus.sublime-color-scheme
Original file line number Diff line number Diff line change
Expand Up @@ -294,9 +294,19 @@
"scope": "markup.underline.link, constant.other.reference.link",
"foreground": "#AAAAAA"
},
{
"name": "Markdown: Link URL Separators",
"scope": "markup.underline.link punctuation.separator",
"foreground": "#AAAAAA"
},
{
"name": "Markdown: Plain Link",
"scope": "meta.link.inet markup.underline.link, meta.link.email.lt-gt markup.underline.link",
"scope": "meta.link.inet markup.underline.link, meta.link.email markup.underline.link",
"foreground": "#444488"
},
{
"name": "Markdown: Plain Link Separators",
"scope": "meta.link.inet markup.underline.link punctuation.separator, meta.link.email markup.underline.link punctuation.separator",
"foreground": "#444488"
},
{
Expand Down Expand Up @@ -381,6 +391,11 @@
"foreground": "#aaaaaa",
"background": "#cccccc"
},
{
"name": "Markdown: Underline",
"scope": "markup.underline",
"font_style": "underline"
},

//
// Markups
Expand Down
17 changes: 16 additions & 1 deletion schemes/MarkdownEditor-Yellow.sublime-color-scheme
Original file line number Diff line number Diff line change
Expand Up @@ -271,9 +271,19 @@
"scope": "markup.underline.link, constant.other.reference.link",
"foreground": "#b7a884"
},
{
"name": "Markdown: Link URL Separators",
"scope": "markup.underline.link punctuation.separator",
"foreground": "#b7a884"
},
{
"name": "Markdown: Plain Link",
"scope": "meta.link.inet markup.underline.link, meta.link.email.lt-gt markup.underline.link",
"scope": "meta.link.inet markup.underline.link, meta.link.email markup.underline.link",
"foreground": "#624369"
},
{
"name": "Markdown: Plain Link Separators",
"scope": "meta.link.inet markup.underline.link punctuation.separator, meta.link.email markup.underline.link punctuation.separator",
"foreground": "#624369"
},
{
Expand Down Expand Up @@ -360,6 +370,11 @@
"foreground": "#c2b58e",
"background": "#e2daab"
},
{
"name": "Markdown: Underline",
"scope": "markup.underline",
"font_style": "underline"
},

//
// Markups
Expand Down
17 changes: 16 additions & 1 deletion schemes/MarkdownEditor.sublime-color-scheme
Original file line number Diff line number Diff line change
Expand Up @@ -271,9 +271,19 @@
"scope": "markup.underline.link, constant.other.reference.link",
"foreground": "#AAAAAA"
},
{
"name": "Markdown: Link URL Separators",
"scope": "markup.underline.link punctuation.separator",
"foreground": "#AAAAAA"
},
{
"name": "Markdown: Plain Link",
"scope": "meta.link.inet markup.underline.link, meta.link.email.lt-gt markup.underline.link",
"scope": "meta.link.inet markup.underline.link, meta.link.email markup.underline.link",
"foreground": "#444488"
},
{
"name": "Markdown: Plain Link Separators",
"scope": "meta.link.inet markup.underline.link punctuation.separator, meta.link.email markup.underline.link punctuation.separator",
"foreground": "#444488"
},
{
Expand Down Expand Up @@ -359,6 +369,11 @@
"foreground": "#B7B7B7",
"background": "#E6E6E6"
},
{
"name": "Markdown: Underline",
"scope": "markup.underline",
"font_style": "underline"
},

//
// Markups
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
22 changes: 20 additions & 2 deletions syntaxes/Markdown.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -914,6 +914,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 @@ -1531,11 +1532,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 Expand Up @@ -3122,7 +3140,7 @@ contexts:
scope: punctuation.definition.attributes.end.markdown
pop: true
- match: \,
scope: punctuation.separator.mapping.pair.markdown
scope: punctuation.separator.sequence.markdown
- match: '{{tag_attribute_name_start}}'
push: [tag-attr-meta, tag-attr-equals, tag-attr-name]

Expand Down
27 changes: 27 additions & 0 deletions syntaxes/Shell (for Markdown).sublime-syntax
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
%YAML 1.2
---
name: Interactive Unix Shell
scope: source.shell.interactive.markdown
hidden: true

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

shell-interactive:
- match: ^\s*(\$)(?=\s)
captures:
1: comment.other.shell
push: shell-statements
with_prototype:
# continuation lines begin with `> `
- match: ^\s*(>)\s
captures:
1: 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'
39 changes: 36 additions & 3 deletions tests/syntax_test_markdown.md
Original file line number Diff line number Diff line change
Expand Up @@ -1690,11 +1690,44 @@ 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
$ ls
| ^^^^^ markup.raw.code-fence.shell.markdown-gfm source.shell.interactive.markdown
| ^ comment.other.shell
| ^^ meta.function-call.identifier.shell variable.function.shell
```

```shell-script

Expand Down

0 comments on commit 2f1c5b7

Please sign in to comment.