https://github.com/skoropadas/telegramify-markdown
Convert markdown into Telegram-specific markdown
https://github.com/skoropadas/telegramify-markdown
converter markdown markdown-converter remark telegram unified
Last synced: 5 months ago
JSON representation
Convert markdown into Telegram-specific markdown
- Host: GitHub
- URL: https://github.com/skoropadas/telegramify-markdown
- Owner: skoropadas
- License: mit
- Created: 2021-05-03T07:43:41.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2025-12-17T15:52:32.000Z (6 months ago)
- Last Synced: 2025-12-21T04:07:08.077Z (6 months ago)
- Topics: converter, markdown, markdown-converter, remark, telegram, unified
- Language: JavaScript
- Homepage:
- Size: 203 KB
- Stars: 88
- Watchers: 2
- Forks: 14
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Telegramify-Markdown
[](https://github.com/skoropadas/telegramify-markdown/actions)
[](https://codecov.io/gh/skoropadas/telegramify-markdown)

Telegramify-Markdown is a Markdown
to [Telegram-specific-markdown](https://core.telegram.org/bots/api#formatting-options) converter, based
on [Unified](https://github.com/unifiedjs/unified) and [Remark](https://github.com/remarkjs/remark/).
## Install
```bash
npm install telegramify-markdown
```
## Usage
```js
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);
/*
*Header*
*Subheader*
[1\.0\.0](http://version.com)
• item 1
• item 2
• item 3
And simple text with \+ some \- symbols\.
*/
```
## 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 tags
- `remove` - remove unsupported tags
- `keep` - ignore unsupported tags (default)
```js
const telegramifyMarkdown = require('telegramify-markdown');
const markdown = `
# Header
> Blockquote
Text in div
`;
telegramifyMarkdown(markdown, 'escape');
/*
*Header*
\> Blockquote
Text in div
*/
telegramifyMarkdown(markdown, 'remove');
/*
*Header*
*/
```
[MIT Licence](LICENSE)