New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

github.com/Feemic/mgodown

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/Feemic/mgodown

  • v0.1.1-0.20200209033116-91ce61c02dbb
  • Source
  • Go
  • Socket score

Version published
Created
Source

A Markdown Parser and HTML or Text Renderer for Go

It's fast and supports common extensions.

Installation

go get -u github.com/Feemic/mgodown

API Docs:

  • /ast : defines abstract syntax tree of parsed markdown document
  • /parser : parser
  • /html : html renderer

Usage

To convert markdown text to HTML (split into heading and main content):

md := []byte("[TOC]\r\n## markdown document")

extensions := parser.CommonExtensions
mkparser := parser.NewWithExtensions(extensions)
htmlFlags := html.CommonFlags | html.TOC
opts := html.RendererOptions{Flags: htmlFlags}
renderer := html.NewRenderer(opts)

heading, content := mgodown.ToHTML(md, mkparser, renderer)

Extensions & Difference

Default option:no empty line before block are supported
Tables: tables are supported if there are spaces in the table header
MathJaX:
add display math block

n \geq 2^{\frac {h} {2}} - 1

History

mgodown is a fork of gomarkdown which is a fork of v2 of blackfriday

Blackfriday itself was based on C implementation sundown which in turn was based on libsoldout.

License

Simplified BSD License

FAQs

Package last updated on 09 Feb 2020

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