Skip to content
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: 1 addition & 1 deletion .github/workflows/ci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
strategy:
matrix:
python:
- '3.13'
- '3.14'
arch:
- 'x64'
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-syntax-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
- build: latest
default_packages: master
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- uses: SublimeText/syntax-test-action@v2
with:
build: ${{ matrix.build }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.13'
python-version: '3.14'
- name: Install MkDocs
run: pip install -r docs/requirements.txt
- name: Run MkDocs
Expand Down
45 changes: 33 additions & 12 deletions Default (Linux).sublime-keymap

Large diffs are not rendered by default.

45 changes: 33 additions & 12 deletions Default (OSX).sublime-keymap

Large diffs are not rendered by default.

45 changes: 33 additions & 12 deletions Default (Windows).sublime-keymap

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Preferences.sublime-settings
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@
"mde.keymap_disable.fold_section": false,
// Open a panel showing all functions related to folding
// Default keys: (OSX/Linux/Win)ctrl+shift+tab
"mde.keymap_disable.show_fold_all_sections": false,
"mde.keymap_disable.show_fold_all_sections": true,
// Jump to the next heading (any level/same or higher level)
// Default keys: (OSX)super+ctrl/shift+pagedown (Linux/Win)ctrl+shift(+alt)+pagedown
"mde.keymap_disable.goto_next_heading": false,
Expand Down
3 changes: 2 additions & 1 deletion messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,6 @@
"3.3.0": "messages/3.3.0.md",
"3.4.0": "messages/3.4.0.md",
"3.5.0": "messages/3.5.0.md",
"3.6.0": "messages/3.6.0.md"
"3.6.0": "messages/3.6.0.md",
"3.6.1": "messages/3.6.1.md"
}
3 changes: 1 addition & 2 deletions plugins/headings/level.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,7 @@ def _set_level(self, edit, calc_level, select):
view = self.view
match_heading_hashes = view.settings().get("mde.match_heading_hashes")
pattern = re.compile(
r"""
(?x)
r"""(?x)
^([ \t>]*) # block quotes
(?:
(\#+) # leading hashes
Expand Down
14 changes: 14 additions & 0 deletions plugins/lint.py
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,21 @@ class md023(mddef):
locator = r"^( +)((?:-+|=+)|(?:#{1,6}(?!#).*))$"
gid = 1

def is_inside_code_block(self, text, s, e):
def calculate_intendation(text, position):
return position - text.rfind("\n", 0, position) - 1

keyword = "```"
block_s = text.rfind(keyword, 0, s - 1)
block_e = text.find(keyword, e)
block_s_intendation = calculate_intendation(text, block_s)
block_e_intendation = calculate_intendation(text, block_e)
assert block_s_intendation == block_e_intendation
return e - s >= block_s_intendation

def test(self, text, s, e):
if self.is_inside_code_block(text, s, e):
return {}
return {s: "%d spaces found" % (e - s)}


Expand Down
2 changes: 1 addition & 1 deletion syntaxes/Markdown.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ variables:
table_codespan_content: |-
(?x:
[^`|] # first or only char must not be a backtick or pipe.
(?:[^|]*?[^`|])? # none must be a pipe, the last additionally must not be a backtick
(?:[^|]*?[^`|])?? # none must be a pipe, the last additionally must not be a backtick
)

table_end: |-
Expand Down
55 changes: 53 additions & 2 deletions tests/syntax_test_markdown.md
Original file line number Diff line number Diff line change
Expand Up @@ -3244,6 +3244,57 @@ test
> bar
| <- markup.quote punctuation.definition.blockquote - meta.table

c1 | c2
--------- | ---------
`Row 1` | `a`, `b`, `c`
|^^^^^^^^^^^^^^^^^^^^^^^^^ meta.table.markdown-gfm
|^^^^^^ markup.raw.inline.markdown
| ^ punctuation.definition.raw.end.markdown
| ^ punctuation.separator.table-cell.markdown
| ^^^ markup.raw.inline.markdown
| ^ punctuation.definition.raw.begin.markdown
| ^ punctuation.definition.raw.end.markdown
| ^^^ markup.raw.inline.markdown
| ^ punctuation.definition.raw.begin.markdown
| ^ punctuation.definition.raw.end.markdown
| ^^^ markup.raw.inline.markdown
| ^ punctuation.definition.raw.begin.markdown
| ^ punctuation.definition.raw.end.markdown

c1 | c2
--------- | ---------
`Row 2` | ``a``, ``b``, ``c``
|^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.table.markdown-gfm
|^^^^^^ markup.raw.inline.markdown
| ^ punctuation.definition.raw.end.markdown
| ^ punctuation.separator.table-cell.markdown
| ^^^^^ markup.raw.inline.markdown
| ^^ punctuation.definition.raw.begin.markdown
| ^^ punctuation.definition.raw.end.markdown
| ^^^^^ markup.raw.inline.markdown
| ^^ punctuation.definition.raw.begin.markdown
| ^^ punctuation.definition.raw.end.markdown
| ^^^^^ markup.raw.inline.markdown
| ^^ punctuation.definition.raw.begin.markdown
| ^^ punctuation.definition.raw.end.markdown

c1 | c2
--------- | ---------
`Row 3` | ```a```, ```b```, ```c```
|^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.table.markdown-gfm
|^^^^^^ markup.raw.inline.markdown
| ^ punctuation.definition.raw.end.markdown
| ^ punctuation.separator.table-cell.markdown
| ^^^^^^^ markup.raw.inline.markdown
| ^^^ punctuation.definition.raw.begin.markdown
| ^^^ punctuation.definition.raw.end.markdown
| ^^^^^^^ markup.raw.inline.markdown
| ^^^ punctuation.definition.raw.begin.markdown
| ^^^ punctuation.definition.raw.end.markdown
| ^^^^^^^ markup.raw.inline.markdown
| ^^^ punctuation.definition.raw.begin.markdown
| ^^^ punctuation.definition.raw.end.markdown

| c1 | c2 | c3 | c4 | c5 | c6 | c7
| --- | --- | --- | --- | --- | --- | ---
| ` ` | ` me ` | `` ` `` | ` `` ` | ``foo`bar`` | ```foo`` | ``foo```
Expand Down Expand Up @@ -9657,11 +9708,11 @@ paragraph

---

::: indendet-code-block
::: indented-code-block
| <- markup.raw.block.markdown
|^^^^^^^^^^^^^^^^^^^^^^^^^^^ markup.raw.block.markdown

::: indendet-code-block
::: indented-code-block
code
:::
|<- markup.raw.block.markdown
Expand Down
2 changes: 1 addition & 1 deletion unittesting.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"verbosity": 1,
"capture_console": false,
"failfast": false,
"reload_package_on_testing": false,
"reload_package_on_testing": false
}