This repository forms the basis for zmarkdown, the JavaScript project intended to replace Python-ZMarkdown, the current Markdown engine powering Zeste de Savoir.
It is a collection of packages extending the remark processor and its MDAST syntax tree, rehype (for HTML processing) and textr (text transformation framework). It also provides MDAST to LaTeX compilation via rebber (and its plugins).
- node >= 8
- npm >= 6
- clone
npm installnpm run bootstrap
This project uses Jest for testing. It is recommended to install the Jest CLI tools globally, and run Jest in watch mode when developing.
npm install -g jestjest --watch --notify(--notifysends desktop notifications when tests run)
-
npm run testThis script tests all packages.
-
npm run cleanThis script clears local dependencies, reinstalls the project and runs all tests.
-
A MDAST tool to split a markdown tree into list of subtrees representing the chapters. It relies on heading depth.
-
transformation of MDAST into
latexcode. This code must be included inside a custom latex to be compiled. Have a look athttps://github.com/zestedesavoir/latex-template/blob/master/zmdocument.clsto get a working example. -
This plugin parses
*[ABBR]: abbr definitionand then replace all ABBR instance in text with a new MDAST node so thatrehypecan parse it intoabbrhtml tag. -
This plugin adds a
titleattribute to the footnote links, mainly for accessibility purpose. -
This plugin wraps (multi-line) raw HTML in
p. -
This plugin parses custom Markdown syntax to center- or right-align elements.
-
Allow to add caption to such element as image, table or blockquote.
-
This plugin parses custom Markdown syntax for Markdown source comments.
-
This plugin parses custom Markdown syntax to create new custom blocks.
-
This plugins replaces ASCII emoticons with associated image. Compatible with rehype
-
This plugin escapes HTML entities from Markdown input.
-
This plugin parses custom Markdown syntax to describe tables.
-
Allows to shift heading to custimize the way you will integrate the generated tree inside your application.
-
remark-heading-trailing-spaces
This plugin removes trailing spaces from Markdown headers.
-
Allows to add
iframeinclusion through!(url)code. -
This plugin parses custom Markdown syntax to handle keyboard keys.
-
This plugin changes how mdast footnotes are displayed by using sequential numbers as footnote references instead of user-specified strings.
-
This plugin parses custom Markdown syntax to handle subscript and superscript.
-
Micro module to fix a common typographic issue that is hard to fix with most keyboard layouts.
-
Micro module to replace
%owith‰and optionally replace the preceding space. -
Fully integrated package to be used in zeste de savoir website