A wasm based markdown compiler to convert markdown text into html
It is a command-line interface for parsing Markdown files to HTML using wasm based markdown compiler. The benchmark shows that it is at least three times faster than its nearest competitor.
This application requires Node.js to be installed on your system. You can install it using npm by running the following command:
npm install -g wmdc
Options:
-f, --format <format>
: Select output format (html|xhtml) (default: html)-b, --bytes
: Return result as a Uint8Array instead of a string--allow-jsuris
: Allow "javascript:" in links--on-code-block <callback>
: Callback for each code block--parse-flags <flags>
: Customize parsing flags (comma-separated)-o, --output <output>
: Set output file path
Example:
wmdc -f html -o output.html input.md
This will parse the input.md
file and save the output to output.html
in HTML format.
This application uses the markdown-wasm
library to parse Markdown files to HTML. It provides a simple command-line interface for converting Markdown files to HTML.
The application handles the following errors:
- File not found
- Input is a directory
- Permission denied
- File is empty
- Unable to read file
- Unable to write to output file
If an error occurs, the application will exit with a non-zero exit code and display an error message.
This application is licensed under the MIT License.
Abhishek Kumar