@barneyc/minimd
v0.2.3
Published
A mini markdown renderer
Readme
Minimd
A small Rust/WebAssembly based project for taking a markup language similar to markdown and converting it into HTML for rendering.
Each line is considered to be its own separate mmd command, and generally the prefix of the line determines the rendering of that line.
Below are some examples of the mmd dialect.
Titles
Using between 1 and 5 hashes, h1 through to h5 elements are rendered.
Linked Titles
Using between 1 and 5 hashes, followed by an @, allows the element to be linked with # in the url and makes the element an anchor.
Dividers
Using three dashes alone on their own line produces an hr element.
Highlights
An exclamation mark before some text puts that text in a special paragraph element that renders in a box.
Code Blocks
A backtick renders the following line as a code element, but currently only on a single line.
Line Breaks
Empty lines produce a br element.
Paragraphs
Any text that isn't specified above is rendered as a paragraph.
Links
Links can be added within paragraph and highlight items using the syntax [href|label!target] to generate label
Building
When this is built to be packaged in npm, the command wasm-pack build --target bundler is used.
When building to run locally via some sort of server, such as in the index.(html|js), wasm-pack build --target web is used.
