Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ST3 next #760

Merged
merged 9 commits into from
Apr 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[run]
omit = */tests/*
25 changes: 23 additions & 2 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,35 @@ indent_size = 4
insert_final_newline = true
trim_trailing_whitespace = true

[*.json]
indent_style = tab
# Markdown

[*.md]
indent_style = space
indent_size = 2
trim_trailing_whitespace = false

# JSON

[*.json]
indent_style = tab
indent_size = 4

[*.sublime-*]
indent_style = tab
indent_size = 4

# XML

[*.tmPreferences]
indent_style = tab
indent_size = 4

# YAML

[*.sublime-syntax]
indent_style = space
indent_size = 2

[*.yml]
indent_style = space
indent_size = 2
6 changes: 3 additions & 3 deletions .github/workflows/ci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ on:
jobs:
lint:
name: Python ${{ matrix.python }}
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
strategy:
matrix:
python:
Expand All @@ -30,9 +30,9 @@ jobs:
- 'x64'
steps:
- name: Checkout Repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v3
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
architecture: ${{ matrix.arch }}
Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/ci-syntax-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,8 @@ jobs:
include:
- build: 3211
default_packages: st3
- build: 4107
default_packages: v4107
- build: latest
default_packages: master
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: SublimeText/syntax-test-action@v2
with:
build: ${{ matrix.build }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci-unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ jobs:
matrix:
st-version: [3, 4]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: SublimeText/UnitTesting/actions/setup@v1
with:
sublime-text-version: ${{ matrix.st-version }}
- uses: SublimeText/UnitTesting/actions/run-tests@v1
with:
coverage: true
codecov-upload: true
- uses: codecov/codecov-action@v4
4 changes: 2 additions & 2 deletions .github/workflows/deploy-gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: '3.8'
- name: Install MkDocs
Expand Down
2 changes: 1 addition & 1 deletion Default (Linux).sublime-keymap
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@
},
{ "keys": ["`"], "command": "move", "args": {"by": "characters", "forward": true}, "context":
[
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown markup.raw - meta.code-fence - markup.raw.code-fence", "match_all": true },
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown markup.raw - 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 }
]
Expand Down
2 changes: 1 addition & 1 deletion Default (OSX).sublime-keymap
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@
},
{ "keys": ["`"], "command": "move", "args": {"by": "characters", "forward": true}, "context":
[
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown markup.raw - meta.code-fence - markup.raw.code-fence", "match_all": true },
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown markup.raw - 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 }
]
Expand Down
2 changes: 1 addition & 1 deletion Default (Windows).sublime-keymap
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@
},
{ "keys": ["`"], "command": "move", "args": {"by": "characters", "forward": true}, "context":
[
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown markup.raw - meta.code-fence - markup.raw.code-fence", "match_all": true },
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown markup.raw - 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 }
]
Expand Down
3 changes: 2 additions & 1 deletion messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,6 @@
"3.1.9": "messages/3.1.9.md",
"3.1.10": "messages/3.1.10.md",
"3.1.11": "messages/3.1.11.md",
"3.1.12": "messages/3.1.12.md"
"3.1.12": "messages/3.1.12.md",
"3.1.13": "messages/3.1.13.md"
}
18 changes: 18 additions & 0 deletions messages/3.1.13.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# MarkdownEditing 3.1.13 Changelog

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

## Bug Fixes

- fix premature block quote termination
- fix extra backticks when creating fenced code blocks (#749)
- fix syntax highlighting of single backticks and code-spans in table cells

## New Features

- syntax highlighting for LaTeX in fenced code blocks

## Changes

[issues]: https://github.com/SublimeText-Markdown/MarkdownEditing/issues
55 changes: 37 additions & 18 deletions syntaxes/Markdown.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#
# The scope suffix should indicate which flavor of Markdown the feature came from,
# to help make this syntax definition easier to maintain.
name: Markdown
name: Markdown (MDE)
scope: text.html.markdown
hidden: true

Expand Down Expand Up @@ -355,7 +355,6 @@ contexts:
push:
- block-quote-caution-meta
- block-quote-body
- block-quote-punctuation-body
- match: '[ \t]{,3}(>)[ ]?((\[)!WARNING(\]))'
captures:
1: punctuation.definition.blockquote.markdown
Expand All @@ -365,7 +364,6 @@ contexts:
push:
- block-quote-warning-meta
- block-quote-body
- block-quote-punctuation-body
- match: '[ \t]{,3}(>)[ ]?((\[)!IMPORTANT(\]))'
captures:
1: punctuation.definition.blockquote.markdown
Expand All @@ -375,7 +373,6 @@ contexts:
push:
- block-quote-important-meta
- block-quote-body
- block-quote-punctuation-body
- match: '[ \t]{,3}(>)[ ]?((\[)!NOTE(\]))'
captures:
1: punctuation.definition.blockquote.markdown
Expand All @@ -385,7 +382,6 @@ contexts:
push:
- block-quote-note-meta
- block-quote-body
- block-quote-punctuation-body
- match: '[ \t]{,3}(>)[ ]?((\[)!TIP(\]))'
captures:
1: punctuation.definition.blockquote.markdown
Expand All @@ -395,7 +391,6 @@ contexts:
push:
- block-quote-tip-meta
- block-quote-body
- block-quote-punctuation-body
- match: '[ \t]{,3}(>)[ ]?'
captures:
1: punctuation.definition.blockquote.markdown
Expand Down Expand Up @@ -624,14 +619,14 @@ contexts:
4: markup.checkbox.begin.markdown-gfm punctuation.definition.checkbox.begin.markdown-gfm
5: markup.checkbox.mark.markdown-gfm
6: markup.checkbox.end.markdown-gfm punctuation.definition.checkbox.end.markdown-gfm
set: block-quote-unordered-list-block-body
push: block-quote-unordered-list-block-body
- match: ([ \t]*)(\d{1,9}([.)]))(\s)
captures:
1: markup.list.numbered.markdown
2: markup.list.numbered.bullet.markdown
3: punctuation.definition.list_item.markdown
4: markup.list.numbered.markdown
set: block-quote-ordered-list-block-body
push: block-quote-ordered-list-block-body

block-quote-ordered-list-block-body:
- meta_content_scope: markup.list.numbered.markdown
Expand Down Expand Up @@ -691,7 +686,7 @@ contexts:

block-quote-paragraph:
- match: '[ \t]*(?=\S)'
set: block-quote-paragraph-body
push: block-quote-paragraph-body

block-quote-paragraph-body:
- meta_scope: markup.paragraph.markdown
Expand Down Expand Up @@ -789,7 +784,6 @@ contexts:
push:
- block-quote-caution-meta
- list-block-quote-body
- block-quote-punctuation-body
- match: '[ \t]{,3}(>)[ ]?((\[)!WARNING(\]))'
captures:
1: punctuation.definition.blockquote.markdown
Expand All @@ -799,7 +793,6 @@ contexts:
push:
- block-quote-warning-meta
- list-block-quote-body
- block-quote-punctuation-body
- match: '[ \t]{,3}(>)[ ]?((\[)!IMPORTANT(\]))'
captures:
1: punctuation.definition.blockquote.markdown
Expand All @@ -809,7 +802,6 @@ contexts:
push:
- block-quote-important-meta
- list-block-quote-body
- block-quote-punctuation-body
- match: '[ \t]{,3}(>)[ ]?((\[)!NOTE(\]))'
captures:
1: punctuation.definition.blockquote.markdown
Expand All @@ -819,7 +811,6 @@ contexts:
push:
- block-quote-note-meta
- list-block-quote-body
- block-quote-punctuation-body
- match: '[ \t]{,3}(>)[ ]?((\[)!TIP(\]))'
captures:
1: punctuation.definition.blockquote.markdown
Expand All @@ -829,7 +820,6 @@ contexts:
push:
- block-quote-tip-meta
- list-block-quote-body
- block-quote-punctuation-body
- match: '[ \t]*(>)[ ]?'
captures:
1: punctuation.definition.blockquote.markdown
Expand All @@ -856,7 +846,7 @@ contexts:

list-block-quote-paragraph:
- match: '[ \t]*(?=\S)'
set: list-block-quote-paragraph-body
push: list-block-quote-paragraph-body

list-block-quote-paragraph-body:
- meta_scope: markup.paragraph.markdown
Expand Down Expand Up @@ -1050,6 +1040,7 @@ contexts:
- include: fenced-jsonc
- include: fenced-jspx
- include: fenced-jsx
- include: fenced-latex
- include: fenced-lisp
- include: fenced-lua
- include: fenced-makefile
Expand Down Expand Up @@ -1506,6 +1497,26 @@ contexts:
1: punctuation.definition.raw.code-fence.end.markdown
2: meta.fold.code-fence.end.markdown

fenced-latex:
- match: |-
(?x)
{{fenced_code_block_start}}
(?i:\s*(latex|tex))
{{fenced_code_block_trailing_infostring_characters}}
captures:
0: meta.code-fence.definition.begin.latex.markdown-gfm
2: punctuation.definition.raw.code-fence.begin.markdown
5: constant.other.language-name.markdown
6: comment.line.infostring.markdown
7: meta.fold.code-fence.begin.markdown
embed: scope:text.tex.latex
embed_scope: markup.raw.code-fence.latex.markdown-gfm
escape: '{{fenced_code_block_escape}}'
escape_captures:
0: meta.code-fence.definition.end.latex.markdown-gfm
1: punctuation.definition.raw.code-fence.end.markdown
2: meta.fold.code-fence.end.markdown

fenced-lisp:
- match: |-
(?x)
Expand Down Expand Up @@ -2899,14 +2910,22 @@ contexts:
table-cell-content:
- match: (?={{balanced_emphasis}})
push: table-cell-emphasis
- match: (?!{{backticks}})`+
scope: invalid.deprecated.unescaped-backticks.markdown
- include: table-cell-code-spans
- include: table-cell-separators
- include: images
- include: literals
- include: critics
- include: math-inline
- include: escapes
- include: links
- include: markups

table-cell-code-spans:
- match: (`+)[^`|]+(\1)
scope: markup.raw.inline.markdown
captures:
1: punctuation.definition.raw.begin.markdown
2: punctuation.definition.raw.end.markdown

table-cell-emphasis:
- include: emphasis
- include: immediately-pop
Expand Down
Loading
Loading