https://github.com/moonbit-community/cmark
Cmark.mbt is a CommonMark toolkit for MoonBit.
https://github.com/moonbit-community/cmark
Last synced: about 2 months ago
JSON representation
Cmark.mbt is a CommonMark toolkit for MoonBit.
- Host: GitHub
- URL: https://github.com/moonbit-community/cmark
- Owner: moonbit-community
- License: apache-2.0
- Created: 2024-10-28T07:48:25.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2025-02-14T03:12:45.000Z (2 months ago)
- Last Synced: 2025-02-14T03:31:06.173Z (2 months ago)
- Language: MoonBit
- Homepage: https://mooncakes.io/docs/#/rami3l/cmark/
- Size: 372 KB
- Stars: 19
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-moonbit - cmark
README
# cmark
Cmark is a [CommonMark][CommonMark specification] toolkit for the MoonBit programming language,
started as a MoonBit rewrite of the [`cmarkit`] library from the OCaml ecosystem.So far, it supports the following use cases:
- Parsing CommonMark documents with best-effort source-aware layout preservation:
- Rendering CommonMark documents via the `Renderer` API, along with a ready-to-use HTML renderer.Supported CommonMark features include:
- Vanilla CommonMark syntax;
- Common syntax extensions, including:
- Strikethroughs
- Task lists
- Footnotes
- Tables
- Inline math
- Math blocks## Building
To begin, you will need to install a recent MoonBit toolchain.
To do so, please refer to instructions at MoonBit's
[official website](https://www.moonbitlang.com/download).Once you have the toolchain installed, you can build this project by running the following command:
```sh
moon build
```## Testing
With the MoonBit toolchain installed, you can run the tests by executing the following command:
```sh
moon test
```## Acknowledgements
`cmark` is built on top several pre-existing projects. Thanks go to:
- Daniel Bünzli for the [`cmarkit`] project;
- John MacFarlane for the [CommonMark specification] and the [`cmark`] project;
- Martin Mitáš for the [`md4c`] project.[CommonMark specification]: https://spec.commonmark.org/
[`cmark`]: https://github.com/commonmark/cmark
[`cmarkit`]: https://github.com/dbuenzli/cmarkit
[`md4c`]: https://github.com/mity/md4c