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 Mar 21, 2024
2 parents a86a7cb + 2278c5c commit 2bc8574
Show file tree
Hide file tree
Showing 8 changed files with 51 additions and 8 deletions.
2 changes: 2 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[run]
omit = */tests/*
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
8 changes: 7 additions & 1 deletion .github/workflows/ci-syntax-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,16 @@ jobs:
include:
- build: 4107
default_packages: v4107
- build: 4126
default_packages: v4126
- build: 4152
default_packages: v4152
- build: 4169
default_packages: v4169
- 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: [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: 2 additions & 0 deletions messages/next.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ feedback you can use [GitHub issues][issues].

## New Features

- syntax highlighting for LaTeX in fenced code blocks

## Changes

[issues]: https://github.com/SublimeText-Markdown/MarkdownEditing/issues
21 changes: 21 additions & 0 deletions syntaxes/Markdown.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -1120,6 +1120,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 @@ -1616,6 +1617,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
12 changes: 12 additions & 0 deletions tests/syntax_test_markdown.md
Original file line number Diff line number Diff line change
Expand Up @@ -1911,6 +1911,18 @@ for (var i = 0; i < 10; i++) {
|^^ meta.code-fence.definition.end.jsx.markdown-gfm punctuation.definition.raw.code-fence.end.markdown
| ^ meta.code-fence.definition.end.jsx.markdown-gfm meta.fold.code-fence.end - punctuation

```latex
| <- meta.code-fence.definition.begin.latex.markdown-gfm punctuation.definition.raw.code-fence.begin.markdown
|^^ meta.code-fence.definition.begin.latex.markdown-gfm punctuation.definition.raw.code-fence.begin.markdown
| ^^^^^ meta.code-fence.definition.begin.latex.markdown-gfm constant.other.language-name.markdown
| ^ meta.code-fence.definition.begin.latex.markdown-gfm meta.fold.code-fence.begin.markdown - punctuation

Check failure on line 1919 in tests/syntax_test_markdown.md

View workflow job for this annotation

GitHub Actions / Sublime Text 4152

[markup.raw.code-fence.latex.markdown-gfm text.tex.latex] does not match scope [text.html.markdown markup.raw.code-fence.latex.markdown-gfm]

Check failure on line 1919 in tests/syntax_test_markdown.md

View workflow job for this annotation

GitHub Actions / Sublime Text latest

[markup.raw.code-fence.latex.markdown-gfm text.tex.latex] does not match scope [text.html.markdown markup.raw.code-fence.latex.markdown-gfm]
| <- markup.raw.code-fence.latex.markdown-gfm text.tex.latex
```
| <- meta.code-fence.definition.end.latex.markdown-gfm punctuation.definition.raw.code-fence.end.markdown
|^^ meta.code-fence.definition.end.latex.markdown-gfm punctuation.definition.raw.code-fence.end.markdown
| ^ meta.code-fence.definition.end.latex.markdown-gfm meta.fold.code-fence.end.markdown - punctuation

```lisp
|^^^^^^ meta.code-fence.definition.begin - meta.fold
| ^ meta.code-fence.definition.begin meta.fold.code-fence.begin
Expand Down

0 comments on commit 2bc8574

Please sign in to comment.