http://kramdown.rubyforge.org/syntax.html#definition-lists
(In html4 it was called definition list, in html5 its called description list)
Would you guys accept a pull request for this?
+1, can just be accessible as a default renderer method.
For reference: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dl
This is a standard HTML element.
Any luck?
+1
We just used this to solve our problem, similar to the way he does it here for Headings :-
var renderer = new marked.Renderer();
renderer.paragraph = function (text) {
var dlTest = /(^|\n\n+)(\S.+)(\n\:(\s{4,}|\t))(\S.+)/
var dl = '\n\n' +
'<dl>' +
'<dt><p>$2</p></dt>' +
'<dd><p>$5</p></dd>' +
'</dl>' +
'\n\n';
if (text.match(dlTest)) {
text = text.replace(dlTest, dl);
return text;
} else {
return '<p>' + text + '</p>\n';
}
};
It's not perfect, as the <dl> tags get duplicated around each row / definition in the list, but we were happy with the result.
+1 I find that definition lists are incredibly useful!
+1
We are currently targeting two Markdown specifications. If you can find where the syntax of these two specifications allow dl, please open a new issue with this reference. See #956 - Thank you.