Closed ghost closed 10 years ago
the goal of reMarked is to reproduce the html given to it rather than what the user sees on the screen. if there is an empty <strong>
tag in the html, it will also be there in the markdown.
you should probably pre-process the html to remove empty tags from it. while it may be a useful option to add, i'd like to encourage people not to create a sea of useless empty tags and expect other libraries to ignore them. garbage in, garbage out.
i'll think about it...
i've decided not to do this.
after starting working on this, the required changes will add a significant amount of code since the render functions are fairly node-specific (not really inherited) and each will need the same logic added to determine whether to wrap empty nodes with tags (where needed) and also with markdown-specific characters. not worth it.
i'll commit the partial work-in-progress to another branch, so feel free to add the remaining code in your own version, but i won't be doing more work on this.
An empty
<strong>
tag gets converted as ****. I think the tag should be ignored.