Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

sublinks-java/sublinks-markdown

Repository files navigation

A markdown parser with rules for frontends of sublinks. Used to easily add markdown support compatible with the standard sublinks frontend.

About

Sublinks markdown is a package that can be imported into your frontend and then used to add markdown support through one function call. All of the markdown rules used in the standard sublinks frontend are supported meaning your users will see the same things as users using the standard frontend without you needing to implement every single rule yourself.

Install

This package is ESM only. To install with npm use:

npm i sublinks-markdown

Usage

To convert text from markdown syntax into html use the mdToHtml function

import { mdToHtml } from "sublinks-markdown";
const html = await mdToHtml("## Hello World", "example.com")

The first argument is the markdown you want converted and the second is the instance of the user currently interacting with the frontend (so things such as relative links populate properly).

Features

About

A markdown parser with rules for frontends of sublinks

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

Contributors

AltStyle によって変換されたページ (->オリジナル) /