3 ms·
This is really useful, thanks! Is there a subset of markdown (preferably with an implementation in Javascript to render it as HTML) that's limited to just the
by adtac 9y ago
This is really useful, thanks!
Is there a subset of markdown (preferably with an implementation in Javascript to render it as HTML) that's limited to just the basic stuff like bold, underline, italics, links, quotes, and code elements? I don't need images, headers, html tags, tables, horizontal lines and the rest.
It's not so much about the restrictions I'm worried about. My research has shown that showdownjs is one of the lightest (~30kB) markdown to HTML rendering libraries in JS, but 30kB is still too large for my application. I would trade the above mentioned features for a smaller file size.
Any suggestions? I know that I can probably write my own implementation, but I'd rather rely on battle-tested libraries instead of rolling out my own.
- hurricaneSlider 9y agoWhy not use one of the pleorhora of static markdown renderers and serve vanilla HTML if you're the bandwidth constrained?
- adtac 9y agoIt has to be dynamically generated because I don't control the content. Also, having the markdown makes it easier to edit and update. Maybe I should look into serving both the markdown AND the HTML.