Closed ddproxy closed 4 years ago
Seems sensitive to the @0.4.1 - thinks it's a tag... great...
@ddproxy I rewrote parts of the parser and bumped the marked
dependency. Leafdoc now retains more empty lines, which should help with these cases. Can you try again?
Not sure what your needs are, but I was surprised that the markdown
template outputs HTML moreso than markdown.
I needed to have raw markdown, so I opened up template.js
and added:
Handlebars.registerHelper('raw', function (str) {
if (!str) { return; }
if (str instanceof Array) {
str = str.join('\n');
}
return str;
});
and then use it as
{{{raw comments}}}
That way, I can commit the raw markdown output to my repo, for example, and have GitHub handle the markdown rendering, or similar. Also great for passing output to static engines that take raw markdown input.
The changes done up to 2.2.1 should help with the formatting. Closing for now.
I'm in the process of transferring all the documentation to leafdocs style for Leaflet.Draw (to encourage documenting changes).
I find that formatting from tables, code blocks, and lists are all hit or miss. Sometimes they generate close enough html or don't pick up the formatting at all.
Example:
I have the following in docs-misc.leafdoc
Obviously expect it to parse into...
CDN's
Several CDN's have Leaflet.Draw available.
but it formats as
Note This may very well be an issue with the marked library but there are no issues attached to that library that fit this issue or issues. I've created a ticket with marked to describe the issue and link back to this ticket as a parent.