Skip to content

Commit 22268f6

Browse files
committed
Merge branch 'st4-develop'
2 parents 6a9da25 + 9d6af6c commit 22268f6

13 files changed

Lines changed: 1739 additions & 1679 deletions

.github/workflows/ci-lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
strategy:
2626
matrix:
2727
python:
28-
- '3.13'
28+
- '3.14'
2929
arch:
3030
- 'x64'
3131
steps:

.github/workflows/ci-syntax-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
- build: latest
3333
default_packages: master
3434
steps:
35-
- uses: actions/checkout@v4
35+
- uses: actions/checkout@v6
3636
- uses: SublimeText/syntax-test-action@v2
3737
with:
3838
build: ${{ matrix.build }}

.github/workflows/deploy-gh-pages.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
- name: Set up Python
2121
uses: actions/setup-python@v6
2222
with:
23-
python-version: '3.13'
23+
python-version: '3.14'
2424
- name: Install MkDocs
2525
run: pip install -r docs/requirements.txt
2626
- name: Run MkDocs

Default (Linux).sublime-keymap

Lines changed: 33 additions & 12 deletions
Large diffs are not rendered by default.

Default (OSX).sublime-keymap

Lines changed: 33 additions & 12 deletions
Large diffs are not rendered by default.

Default (Windows).sublime-keymap

Lines changed: 33 additions & 12 deletions
Large diffs are not rendered by default.

Preferences.sublime-settings

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@
177177
"mde.keymap_disable.fold_section": false,
178178
// Open a panel showing all functions related to folding
179179
// Default keys: (OSX/Linux/Win)ctrl+shift+tab
180-
"mde.keymap_disable.show_fold_all_sections": false,
180+
"mde.keymap_disable.show_fold_all_sections": true,
181181
// Jump to the next heading (any level/same or higher level)
182182
// Default keys: (OSX)super+ctrl/shift+pagedown (Linux/Win)ctrl+shift(+alt)+pagedown
183183
"mde.keymap_disable.goto_next_heading": false,

messages.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,6 @@
2727
"3.3.0": "messages/3.3.0.md",
2828
"3.4.0": "messages/3.4.0.md",
2929
"3.5.0": "messages/3.5.0.md",
30-
"3.6.0": "messages/3.6.0.md"
30+
"3.6.0": "messages/3.6.0.md",
31+
"3.6.1": "messages/3.6.1.md"
3132
}

plugins/headings/level.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,7 @@ def _set_level(self, edit, calc_level, select):
7878
view = self.view
7979
match_heading_hashes = view.settings().get("mde.match_heading_hashes")
8080
pattern = re.compile(
81-
r"""
82-
(?x)
81+
r"""(?x)
8382
^([ \t>]*) # block quotes
8483
(?:
8584
(\#+) # leading hashes

plugins/lint.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -591,7 +591,21 @@ class md023(mddef):
591591
locator = r"^( +)((?:-+|=+)|(?:#{1,6}(?!#).*))$"
592592
gid = 1
593593

594+
def is_inside_code_block(self, text, s, e):
595+
def calculate_intendation(text, position):
596+
return position - text.rfind("\n", 0, position) - 1
597+
598+
keyword = "```"
599+
block_s = text.rfind(keyword, 0, s - 1)
600+
block_e = text.find(keyword, e)
601+
block_s_intendation = calculate_intendation(text, block_s)
602+
block_e_intendation = calculate_intendation(text, block_e)
603+
assert block_s_intendation == block_e_intendation
604+
return e - s >= block_s_intendation
605+
594606
def test(self, text, s, e):
607+
if self.is_inside_code_block(text, s, e):
608+
return {}
595609
return {s: "%d spaces found" % (e - s)}
596610

597611

0 commit comments

Comments
 (0)