Secure markdown renderer working on browsers for user input data.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.travis chore(config): update deploy scripts Jan 3, 2018
gh-pages refactor: refactoring Dec 23, 2018
src refactor: refactoring Dec 26, 2018
.gitconfig chore(repo): add initial contents Feb 17, 2017
.gitignore chore(package): update dependencies Jun 20, 2017
.travis.yml chore: update test matrix Dec 12, 2018
CHANGELOG.md fix: fix ruby syntax to disallow unused ruby text Dec 25, 2018
Gemfile
LICENSE.1 chore(license): add license Feb 22, 2017
LICENSE.2 chore(license): add license Feb 22, 2017
NOTICE.md chore: add license notice Dec 8, 2018
README.md refactor: refactoring Dec 10, 2018
design.md docs: update design notes Nov 30, 2018
global.d.ts feat: add ruby syntax Nov 9, 2018
global.test.d.ts refactor: split global declaration file Mar 28, 2018
gulpfile.js chore: update build scripts Dec 26, 2018
index.d.ts feat: add graph syntax Nov 11, 2018
index.ts feat(util): add toc function Mar 4, 2018
karma.conf.js
markdown.d.ts refactor: refactoring Dec 25, 2018
package.json chore: version 0.94.1 Dec 25, 2018
tsconfig.json chore(package): update dependencies Jan 10, 2018

README.md

Securemark

Build Status Coverage Status Dependency Status

Secure markdown renderer working on browsers for user input data.

Features

  • Secure DOM rendering.
  • Declarative syntax.
  • Recursive parsing.
  • Incremental update.
  • Progressive rendering.
  • Unblinking rendering.
  • Large document support.
  • Syntax highlight with PrismJS.
  • LaTeX rendering with MathJax.
  • Figure, Annotation, and Authority syntax.
  • Index generation for headings, terms, and figures.
  • Shortlink syntax for local references of indexes and figures.
  • Auto numbering of figures and footnotes.
  • Footnote and its bidirectional reference link generation from annotations and authorities.
  • Table of contents.

Demos

https://falsandtru.github.io/securemark/

APIs

index.d.ts

Syntax

markdown.d.ts

  • Heading (#)
  • UList (-)
  • OList (1.)
  • DList (~)
  • Table (| |)
  • Blockquote (>, !>)
  • Preformattedtext (```)
  • HorizontalRule (---)
  • Inline markups (*, ~~, `, []{}, ![]{}, [](), (()), [[]], ...)
  • Inline HTML tags (<smal>, <ruby>, <code>, ...)
  • Autolink (https://host, ttps://host, !https://host/image.png, account@host, @account)
  • Media (!https://host/image.png, !https://youtu.be/..., !https://gist.github.com/...)
  • Syntex highlight (```lang filename)
  • LaTeX (${expr}$, $$expr$$)
  • Figure (~~~figure [:fig-name])
  • Label ([:fig-name])
  • Annotation (((annotation)))
  • Authority ([[authority]])
  • Index (# title [#section], ~ term [#term], [#some words])
  • Channel (@account#tag)
  • Hashtag (#tag)
  • Comment (<# comment #>)

Media

  • Twitter
  • YouTube
  • Gist
  • SlideShare
  • PDF (.pdf)
  • Video (.webm, .ogv)
  • Audio (.oga, .ogg)
  • Images

Graph

Dependencies

  • PrismJS
  • MathJax
  • jQuery (for Ajax)
  • DOMPurify

Browsers

Requires es6 and modern DOM API support.

  • Chrome
  • Firefox
  • Edge
  • Safari

Polyfill: https://cdn.polyfill.io