ldoc
ldoc copied to clipboard
Improve markdown template
Heavily based on ldoc_ltp.lua.
Requires template_escape = "!" setting in config.ld.
Requires template_escape = "!" setting in config.ld.
Isn't that a breaking change? Can't we stick to the original ( > iirc)
@Tieske Yes I think I didn't do enough investigation for this change. I will make it a draft and come back to it.
However, my decision to change the template escape to something else was because > is the block quote character in markdown spec. I don't know the best way to address this.
Tieske, I found your .md template to be very helpful in drafting my own markdown template. Yes, the built-in one is too simplistic.
But regarding your question on the escape character, I suspect that > was chosen specifically because it is a block quote character in markdown: you wouldn't normally want a block-quote hard-coded into a template. And if you did, you could easily start your template line with $('>') to achieve the same effect.
However, I did find that yours needs some polishing. For example, whitespace is not trimmed from the ends of item names, and I found that my markdown renderer (Typora) requires - within hrefs, rather than _.