makepanic / markup-parser

A set of primitives for building string markup parsers

Home Page:https://makepanic.github.io/markup-parser/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

markup-parser

Build Status Dependency Status Code Climate npm version

Live preview of slack like markup.

A set of primitives for building string markup parsers. See markups/*.ts for a setup that exports a tokenizer and parser to handle string formatting like slack does. Check out example.ts to see how to use the tokenizer + parser with any given string input.

TODO:

  • docs

Architecture

  • String is processed in three steps:
  1. Tokenizer(text) -> Token[]
  2. Parser(Token[]) -> NodeTree
  3. NodeTree(text) -> processed text

About

A set of primitives for building string markup parsers

https://makepanic.github.io/markup-parser/

License:MIT License


Languages

Language:TypeScript 86.9%Language:CSS 7.7%Language:HTML 5.4%