markdown-ts-mode: Fix code-block fontification leak

* lisp/textmodes/markdown-ts-mode.el
(markdown-ts--fontify-non-ts-collect-faces): Prevent
'font-lock-ensure' from widening and fontifying outside the
intended code-block (bug#81412).
This commit is contained in:
Eshel Yaron 2026-07-18 15:58:51 +02:00
parent 6107196a32
commit 94ee683d63
No known key found for this signature in database
GPG key ID: EF3EE9CA35D78618

View file

@ -2989,7 +2989,7 @@ content as a standalone markdown document, which is what we want."
'markdown-ts-inhibit-code-block-mode-warnings
(delay-mode-hooks (funcall mode)))
(narrow-to-region beg end)
(font-lock-ensure)
(let ((font-lock-dont-widen t)) (font-lock-ensure))
(let ((pos (point-min)))
(while (< pos (point-max))
(let ((next (next-single-property-change