Reputation: 2548
I have a custom converter that pulls footnote tags from a markdown document. Anything marked as a footnote (marked like so: ^^footnote^^) gets removed from the document and attached to an unordered list. Once all the footnotes are in the list, the whole list is appended to the bottom of the document.
This all works great, except that no markdown conversion is performed on the pulled footnotes. For example, _hello_
isn't put into italics and the underscores are left intact.
I don't know why. It seems that if the markdown converter runs before custom converters, then the markdown formatting should have already taken place. If the markdown converter runs after the custom converter, then the footnotes should be processed along with everything else.
Any ideas? This SO question is similar, but I tried that and nothing changed.
Upvotes: 1
Views: 977
Reputation: 52809
You can try markdownify Jekyll filter :
{{ myVar | markdownify }}
If your problem is to instruct kramdown to parse markdown in html tag, you can configure this in your _config.yml
kramdown:
parse_block_html: true
parse_span_html: true
Upvotes: 0
Reputation: 2548
I had the wrong question here. It has nothing to do with the converter and everything to do with how markdown (or kramdown, in this case) ignores everything in an HTML block.
Apparently this can be changed, but I was unable to get that working. What did work was switching from markdown to redcarpet. Just change markdown: kramdown
to markdown: redcarpet
and my footnotes formatted properly. There are probably other implications in doing things this way, but so far, so good.
Upvotes: 1