Skip to content

UpperCod/markdown-inline

Repository files navigation

@uppercod/markdown-inline

This package allows the use of markdown thanks to the use of Template literals, the parser @uppercod/markdown-inline transforms the template into tree format created from a createElement type function, example pragma(tag: string, props: any, ...children: any []):any, being this friendly with the virtualDOM.

Install

npm install @uppercod/markdown-inline

Usage

import { createElement } from "react";
import { setup } from "@uppercod/markdonn";

const md = setup(createElement);

md`
# example

bla bla bla...

**bold**

_italic_

[link](#link)

![image](./my.jpg)

Custom ${(<MyComponent />)}

`;

Todo

  • Nested lists: The parser generates a tag index that defines the depth of the tag. I have not applied that argument to create nested lists.
  • Line division.
  • Task lists.