Skip to content

Fix issue with fontification when markdown-inline is enabled #80

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 14, 2025

Conversation

rrudakov
Copy link
Contributor

Many thanks to Juri Linkov juri@linkov.net for his assistance.

Close #60

  • Use local inline-markdown parsers for each docstring to avoid fontification of unrelated Clojure code.
  • Define sexp "things" for inline markdown to improve navigation inside of the docstrings.

Before submitting a PR mark the checkboxes for the items you've done (if you
think a checkbox does not apply, then leave it unchecked):

  • You've run M-x checkdoc and fixed any warnings in the code you've written.
  • You've updated the changelog (if adding/changing user-visible functionality).
  • You've updated the readme (if adding/changing user-visible functionality).

Thanks!

@@ -1380,7 +1389,6 @@ See `clojure-ts--font-lock-settings' for usage of MARKDOWN-AVAILABLE."
(let ((use-markdown-inline (and clojure-ts-use-markdown-inline
(treesit-ready-p 'markdown-inline t))))
(when use-markdown-inline
(treesit-parser-create 'markdown-inline)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, so this was not supposed to be used in this manner. Good to know!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I actually tried to pass :local t to the range function but it didn't work because I didn't remove this line as well. It was a good idea to ask for help in Emacs-bugs mailing list.

@bbatsov
Copy link
Member

bbatsov commented Apr 14, 2025

Apart from my small remarks and the failing test - the changes look good to me.

…is enabled

Many thanks to Juri Linkov <juri@linkov.net> for his assistance.
@rrudakov rrudakov force-pushed the feature/local-md-parser branch from 3139463 to c71c33e Compare April 14, 2025 19:08
@rrudakov rrudakov requested a review from bbatsov April 14, 2025 19:09
@bbatsov bbatsov merged commit c2aedeb into clojure-emacs:main Apr 14, 2025
3 checks passed
@rrudakov rrudakov deleted the feature/local-md-parser branch April 14, 2025 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Issues with markdown inline
2 participants