From c1a8d917fe8ac17db74a2d8de5a902dc33a4d26c Mon Sep 17 00:00:00 2001 From: Kirill Muravev <48129887+studokim@users.noreply.github.com> Date: Wed, 25 Feb 2026 11:17:52 +0300 Subject: [PATCH 1/2] Plugins: fix linter complaining on bash comments in code blocks --- plugins/lint.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/plugins/lint.py b/plugins/lint.py index 5d6a09ba..af819b1f 100644 --- a/plugins/lint.py +++ b/plugins/lint.py @@ -591,7 +591,21 @@ class md023(mddef): locator = r"^( +)((?:-+|=+)|(?:#{1,6}(?!#).*))$" gid = 1 + # 2025-05-14, studokim: the default implementation complains on bash comments in code blocks + 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 # if fails, then the algorithm is wrong + 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)} From 3c9d2f1fb5e59ad2b7f725d981a08465181601ad Mon Sep 17 00:00:00 2001 From: Kirill Muravev <48129887+studokim@users.noreply.github.com> Date: Wed, 25 Feb 2026 12:16:06 +0300 Subject: [PATCH 2/2] Describe commit in next.md --- messages/next.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 messages/next.md diff --git a/messages/next.md b/messages/next.md new file mode 100644 index 00000000..42070bf5 --- /dev/null +++ b/messages/next.md @@ -0,0 +1,13 @@ +# MarkdownEditing {version} Changelog + +Your _MarkdownEditing_ plugin is updated. Enjoy new version. For any type of +feedback you can use [GitHub issues][issues]. + +## Bug Fixes + +## New Features + +## Changes + - embedded linter no longer complains on Bash- and Python-style comments in code blocks (previously it triggered the `MD023` rule) + +[issues]: https://github.com/SublimeText-Markdown/MarkdownEditing/issues