0.1.2 • Published 3 years ago

@wesvetter/md-to v0.1.2

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

md2

Convert Markdown to Remarkup (the Phabricator markup language).

Usage

const md2 = require('md-to');
const myMarkdownContent = 'I _prefer_ writing [Markdown](https://commonmark.org/)';
const myRemarkupContent = md2.phab(myMarkdownContent);
console.log(myRemarkupContent);
// "I //prefer// writing [[ https://commonmark.org/ | Markdown ]]"

Implementation

md2 is written in CoffeeScript and uses the unified ecosystem to convert a Markdown AST into Remarkup text.

Several Markdown syntaxes are supported by Remarkup and don't need to be converted, like **bold** and - my list item. The main things that it does convert are:

  • Inline links - Please visit [my blog](https://www.example.com')
  • Reference links - Please visit [my blog][my-cool-blog-ref]
  • Italics (aka. "emphasis") - I _love_ candy corn.

Because reference-style links are not supported in Remarkup, the processor will covert them to inline links, so [my blog][my-blog] will get converted to [[ https://www.example.com | my blog ]].

License

MIT