yet another markdown alternative
One problem of markdown is that it has all kinds of delimiters that conflict with each other, making it difficult to correctly apply complex formatting, so you just end up embedding the raw HTML. In order to mitigate this problem yamd introduces only two kinds of delimiters:
- Brackets: used to create all kinds of tags
[*italic text]
becomes<i>italic text</i>
in HTML, much like*italic text*
in markdown[**bold text]
becomes<b>bold text</b>
in HTML, much like**bold text**
in markdown
- Backticks: used to prevent plain text from being formatted
`[*italic text]`
becomes[*italic text]
in HTML
yamd also allows you to easily create your own tags. Refer to the documentation for more information. You can also try yamd on the demo page.
npm install yamd
const yamd = require('yamd');
yamd.render('[*italic text]'); // <p><i>italic text</i></p>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/yamd@latest/web/yamd.default.css">
<script src="https://cdn.jsdelivr.net/npm/yamd@latest/dist/yamd.min.js"></script>
<script>
yamd.render('[*italic text]'); // <p><i>italic text</i></p>
</script>