-
Notifications
You must be signed in to change notification settings - Fork 54
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Context
Square brackets escape has been relaxed in #112 and in #464. However, for my use case (Gitlab flavored markdown) it still falls short because it screws the automatic generation of the ToC which is done by inserting the [[_TOC_]] token. Currently it gets formatted as \[\[_TOC_\]\] and this breaks the ToC generation on Gitlab.
Proposal
Either:
- implementing Support for "ignore" comments #53
- adding an additional heuristics ignoring double brackets for
escape_square_bracketsinsrc/mdformat/renderer/_util.py
could work. Proposal 1 would probably be the best since it would solve other issues and have no side effects, but being open since a long time I guess it might be hard to implement. Proposal 2 could be easier, but I'm not sure if it would work nor which side effects it could have.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request