cfm-parser
v0.2.0
Published
Parser for Collaborizm Flavoured Markdown, i.e, Markdown flavour used on Collaborizm.com
Downloads
20
Readme
Collaborizm Flavoured Markdown Parser
Installation
npm install cfm-parser
Usage
import { cfmToHtml } from 'cfm-parser'
// Add Prism nom-default language
// No need for markup, css, clike, javascript
// Refer http://prismjs.com/#languages-list
import 'prismjs/components/prism-markdown.js';
// Import default CSS stylesheet if not using custom
import 'cfm-parser/css/style.css'
// Import styles for CSS highlighting
// Refer http://prismjs.com/ for theme names
import 'prismjs/themes/prism-okaidia.css';
const md = '## *Markdown*'
const html = cfmToHtml(md)
Reference
Function cfmToHtml(markdown, linkify, uiClass, domainName, sourceLineNumber)
Converts Collaborizm Flavoured Markdown to HTML.
markdown
Collaborizm Flavoured Markdownlinkify
Converts URLs to HTML hyperlinks
Default: trueuiClass
CSS class names for HTML output
Default: object{ atProfile: 'md-at-person', atProject: 'md-at-project', adHocTag: 'md-hashtag-adhoc', hashTag: 'md-hashtag', img: 'md-img', youtube: 'md-yt', table: 'md-table', blockquote: 'md-blockquote' }
domainName
Domain name parameter for YouTube embed.
Default: ''sourceLineNumber
Add adata-input-line
attribute to each topmost HTML element that corresponds to the line number of the source markdown
Default: true