New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

@tlylt/rmark

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tlylt/rmark

A simple regex-based toy Markdown parser written in TypeScript

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

RMark

RMark is a simple regex-based toy Markdown parser written in TypeScript.

Usage

Install the package:

npm install @tlylt/rmark

Import the package and use it:

import { RMark } from '@tlylt/rmark';

const rmark = new RMark();
const html = rmark.render('# Hello, world!');

Add more rules to the parser:

import { RMark, Rule, Pattern } from '@tlylt/rmark';

const rmark = new RMark();
rmark.addRule(
    new Rule('horizontal', [
    new Pattern(/^(-{3})/gm, '<hr />'),
    new Pattern(/^(_{3})/gm, '<hr />'),
    ])
);
const html = rmark.render('---');

Keywords

markdown

FAQs

Package last updated on 05 Jan 2023

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