mdformat icon indicating copy to clipboard operation
mdformat copied to clipboard

Consider adding a hook for plugins to disable other plugins

Open hukkin opened this issue 4 years ago • 1 comments
trafficstars

https://github.com/executablebooks/mdformat-myst/pull/9#issuecomment-867065882

hukkin avatar Jun 23 '21 19:06 hukkin

I think best way to design this is to read for .mdformat.yaml in each folder, and merge the options of the last given .mdformat.yaml. Then expose an option of a dict where we define the keys as the plugins we want to load, and the values are how we configure, e.g.:

#.mdformat.yaml
plugins:
  mdformat-gfm:
---
#docs/.mdformat.yaml
plugins:
  mdformat-myst:
    args: [ --dollarmath ]
    exclude: README.md
  mdformat-gfm:
    include: README.md

LecrisUT avatar Feb 28 '23 05:02 LecrisUT