🚀 Socket Launch Week 🚀 Day 3: Socket Acquires Coana.Learn More

react-markdown-github

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-markdown-github

React component that renders Markdown similarly to Github's formatting

3.3.0
Version published
Weekly downloads
39
116.67%
Maintainers
3
Weekly downloads
 
Created

react-markdown-github

A React component that wraps react-markdown that:

Installation

npm install react-markdown-github

Usage

<MarkdownGithub 
  source={ markdown } 
  sourceUri='https://github.mycorp.com/org/component/blob/master/README.md'  
  transformLinkUri={ ({ uri, github, org, repo, filename, filepath }) => { } }
  transformImageUri={ ({ uri, github, org, repo, filename }) => {} }
  renderers={ code: myCodeFormatter } 
  className='myClass' />

Component Properties

  • sourceUri Absolute URL to orgional markdown. All relative links will be resolved relative to this URL.
  • transformLinkUri URL resolver function. To override the URL resolver and point a url to an alternate location.
  • transformImageUri image URL resolver function. Default behavior is to not modify image urls.
  • renderers An object of render function values with keys corresponding to Node Type to be passed to react-markdown.
  • className the CSS class passed to react-markdown.

Test

npm test
LICENSE: MIT

FAQs

Package last updated on 15 Jul 2019

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