Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

telegramify-markdown

Package Overview
Dependencies
Maintainers
0
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

telegramify-markdown

Convert markdown into Telegram-specific markdown

  • 1.2.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

Telegramify-Markdown

Build codecov License

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);
/*
 *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)
const telegramifyMarkdown = require('telegramify-markdown');
const markdown = `
# Header

> Blockquote

<div>Text in div</div>
`;

telegramifyMarkdown(markdown, 'escape');
/*
*Header*

\> Blockquote

<div\>Text in div</div\>
*/

telegramifyMarkdown(markdown, 'remove');
/*
*Header*
 */

sec

MIT Licence

Keywords

FAQs

Package last updated on 02 Aug 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc