The easiest way to reproduce this issue is to install clojure-ts-mode from NonGNU ELPA. inline-markdown is used to highlight Markdown syntax in docstrings, and it functions correctly when the Markdown is valid. However, if the Markdown syntax within a docstring is incorrect (for example, unbalanced backticks), the syntax highlighting breaks even beyond the docstring. We use the following range setting for inline markdown: (treesit-range-rules :embed 'markdown-inline :host 'clojure (clojure-ts--docstring-query '@capture)) The query captures docstrings correctly. Steps to reproduce starting from 'emacs -Q': 1. Evaluate in the *scratch* buffer: (package-initialize) (package-install 'clojure-ts-mode) (require 'clojure-ts-mode) 2. Open attached file bug.clj 3. Remove one of backticks from the first docstring. Expected result: syntax highlighting of the Clojure code is not affected. Actual result: part of the Clojure code is highlighted with the face defined for markdown code_span query. Image attached. P.S. There is a possibility that an issue within clojure-ts-mode is the cause. Any advice on how to resolve this would be appreciated. Thank you in advance.