Telegramify-Markdown
Telegramify-Markdown is a Markdown
to Telegram-specific-markdown converter, based
on Unified and Remark.
Install
npm install telegramify-markdown
Usage
const telegramifyMarkdown = require('telegramify-markdown');
const markdown = `
# Header
## Subheader
[1.0.0](http://version.com)
* item 1
* item 2
* item 3
And simple text with + some - symbols.
`;
telegramifyMarkdown(markdown);
Possible options
You can also add unsupported tags strategy as a second argument, which can be one of the following:
escape
- escape unsupported symbols for unsupported tagsremove
- remove unsupported tagskeep
- ignore unsupported tags (default)
const telegramifyMarkdown = require('telegramify-markdown');
const markdown = `
# Header
> Blockquote
<div>Text in div</div>
`;
telegramifyMarkdown(markdown, 'escape');
telegramifyMarkdown(markdown, 'remove');
sec
MIT Licence