markdown-mode
markdown-mode copied to clipboard
Markdown hiding for links broken when text surrounded by square brackets
I added the link
[`[resources]`](https://luigi.readthedocs.io/en/stable/configuration.html?highlight=resources#resources) section you can
which on github renders properly as [resources]. In markdown-mode the markdown-hiding is broken for that type of link text. I admit this is tricky, not sure how other mardown-renderers handle this. But gfm-mode at least should aim to reproduce what github is showing.
Expected Behavior
When markdown hiding is enabled, render a link to a toml section where the link text contains the square brackets as [text], don't show the URL.
Actual Behavior
All parts of the markdown are shown, nothing is hidden when the link text is surrounded by square brackets in Emacs:
Steps to Reproduce
Reproduced with
emacs -Q --load path/to/markdown-mode.el test-case.md
M-x gfm-mode
M-x markdown-toggle-markup-hiding
test-case.md
Software Versions
- Markdown Mode: version 2.7-alpha, from git using Elpaca default recipe, b1a862f.
- Emacs: GNU Emacs 29.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.38, cairo version 1.17.8)
- OS: ArchLinux