Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cfm-parser

Package Overview
Dependencies
Maintainers
2
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cfm-parser

Parser for Collaborizm Flavoured Markdown, i.e, Markdown flavour used on Collaborizm.com

  • 0.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
Maintainers
2
Weekly downloads
 
Created
Source

Collaborizm Flavoured Markdown Parser

Collaborizm Build Status

NPM

 

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 Markdown

  • linkify
    Converts URLs to HTML hyperlinks
    Default: true

  • uiClass
    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 a data-input-line attribute to each topmost HTML element that corresponds to the line number of the source markdown
    Default: true

Keywords

FAQs

Package last updated on 09 Jul 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc