froide icon indicating copy to clipboard operation
froide copied to clipboard

Markdown processor follows weird standards

Open krmax44 opened this issue 4 years ago • 3 comments

compare the rendering between python-markdown: https://fragdenstaat.de/gesetz/informationszugangsgesetz-sachsen-anhalt-izg-lsa/#%C2%A73

and github: https://github.com/okfde/ifg.md/blob/main/ifgs/ifg-sachsen-anhalt.md#-3-schutz-von-besonderen-%C3%B6ffentlichen-belangen

indentation is off, causing ordered lists to have wrong indexes. also, tables are using some obscure php-md syntax instead of the more popular github-flavored one...

krmax44 avatar Mar 24 '21 13:03 krmax44

Maybe we need a fancier markdown converter, one that also places anchors like gh-flavored one.

stefanw avatar Mar 24 '21 18:03 stefanw

There's a wide range of Markdown Flavors. It looks like Python-Markdown has no extension for those out-of-the-box. However, there seem to by py-gfm as third-party extension for it. But the README warns for it since it might become orphaned soon.

Ryuno-Ki avatar Apr 09 '21 16:04 Ryuno-Ki

I think the best bet is to go with the CommonMark spec and the apparently up-to-date Python implementation. Doesn't seem to offer extensions though, need to check if everything you want is covered.

stefanw avatar Apr 09 '21 18:04 stefanw