Libbum / AxiomaticSemantics

Personal blog powered by zola
https://axiomatic.neophilus.net
4 stars 2 forks source link

Solution to pandoc extensions #2

Closed Libbum closed 6 years ago

Libbum commented 6 years ago

ATM there are a number of conversion deficiencies, such as --- not converting to an em dash, and footnotes not rendering. This is because I had these extensions turned on in pandoc, and now were using commonmark (I think).

Investigate how we can best remedy this.

Libbum commented 6 years ago

Footnotes may be fine: pulldown-cmark docs, although punctuation nosomuch: google/pulldown-cmark#119.

Libbum commented 6 years ago

Footnotes are used with an [^a] syntax. We're not using that. We're making tooltips or some other definition thing happen - but I can't see which pandoc extension that is from atm. There's only a few of them, so let's just rethink that setup.

Edit: The extension is abbreviations which is a PHP extension apparently...

*[WHO] World Health Organisation --> <abbr title="World Health Organisation">WHO</abbr>

Libbum commented 6 years ago

2690b2e0 'solves' the abbreviation issue. It styles them up to match the theme, and essentially just removes the markdown for them, It's more work to get this happening than really needed. Markdown should aim to speed up writing html, but it's not necessary to replace it all the time. If you need an abbreviation just encapsulate it.

Punctuation still being looked into. Pandoc replaces --, --- and .... That's just a straightforward search and replace, but not sure if pulldown-cmark will take it since it isn't in commonmark.

Libbum commented 6 years ago

It's not too much more effort to use &ndash;, &mdash; and $hellip; really. Or any other named entity for that matter.

So in that sense I think I'll close this one for now and just agree that markdown has limitations and there's no problem using raw HTML when it suits.