Skip to content

mvasilkov/gfm.macro

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gfm.macro

GitHub Flavored Markdown Babel macro converts Markdown to JSX at compile time using the cmark-gfm C library.

npm


Installation

yarn add gfm.macro babel-plugin-macros

Add macros to your Babel configuration:

{
  "plugins": ["macros"]
}

Usage

import gfm from 'gfm.macro'

const jsx = gfm`
GitHub Flavored Markdown
===
`

const withOptions = gfm(`
<button>GitHub Flavored Button</button>
`, { unsafe: true })

Options

The default options are as follows:

const defaultOptions = {
    react: true,
    extensions: {
        table: true,
        tasklist: true,
    },
}

About

GitHub Flavored Markdown Babel macro converts Markdown to JSX at compile time using the cmark-gfm C library.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published