mirror of
https://github.com/xoofx/markdig.git
synced 2026-02-04 05:44:50 +00:00
Definition list output #83
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @daveaglick on GitHub (Jan 9, 2017).
Just curious what the thought is behind the definition list syntax borrowed from PHP Markdown doesn't output the semantic
<dl><dt></dt><dd></dd></dl>HTML markup and instead outputs a custom set of markup inside a<p>element? Not sure either approach is better than the other, but the former is easier to style with CSS if nothing else (and libraries like Bootstrap already have element styles to support it).@xoofx commented on GitHub (Jan 9, 2017):
Not sure to understand, but checking babelmark, everything seems fine from there no?
@xoofx commented on GitHub (Jan 9, 2017):
ha, maybe it is because it's borrowed from "PHP Markdown Extra" not "PHP Markdown"...
@daveaglick commented on GitHub (Jan 9, 2017):
Sorry, probably wasn't totally clear. Given the following Markdown:
I'm curious why this gets generated:
Instead of this:
To be honest, I'm really surprised at how many Markdown processors do the former from the babelmark link - it seems interesting to use an arbitrary output that injects extra characters (like that
:to separate the term from the definition) when HTML elements for this exist. Wondering if there is some reasoning I'm not realizing (like lack of browser support for the<dl>family of elements)...@xoofx commented on GitHub (Jan 9, 2017):
but the
<p>...</p>output is for plain markdig (CommonMark only), butmarkdig (advanced)generates the correct output right? (check again babelmark above).The definition list is not standardized by CommonMark. The implementation in markdig is trying to mimic the behavior of PHP Mardown Extra, but there is no guarantee that we will have the same output for all circumstances... But as you noticed, many Markdown implementations don't even have this implemented...
@daveaglick commented on GitHub (Jan 9, 2017):
Interesting - I'll have to do some research and make sure I'm not screwing something up. As far as I can tell, I'm getting the
<p>output even with "advanced+bootstrap" set as the extension string.@daveaglick commented on GitHub (Jan 9, 2017):
All is well - it took me a little while to realize that there needs to be extra whitespace between the
:and the description for the list formatting to kick in. Turns out I was just outputting normal Markdown without triggering the description list handling.