Nabladown.js – A pseudo Markdown language with macros, math, code and HTML
14 days ago
- #javascript
- #markdown
- #html-rendering
- Nabladown.js is a JavaScript library for parsing and rendering a Markdown-like language into HTML.
- It focuses on rendering code, equations, and HTML, with support for macros to extend language features.
- The library provides two main functions: `parse` (String → AST) and `render` (AST → HTML).
- Nabladown.js supports various features including lists, links, images, videos, footnotes, and inline/block equations using TeX syntax.
- Macros can be defined and used to extend functionality, such as adding classes, quotes, or dynamic content like dates.
- The library can be used in both browser and Node.js environments, with different renderers available (vanilla, math, code, and combined).
- Custom renderers can be created by extending the base `Render` class or composing existing renderers.
- Future improvements include optimizing HTML generation, adding paragraph support in lists, and enhancing code rendering styles.