common_marker
Version, currently 0.7.18 versions
github.com/mamantoha/crystal-cmark-gfm
Minimal C bindings for parsing and rendering with cmark-gfm
Installation
# Add this to your shard.yml
dependencies:
common_marker:
github: mamantoha/crystal-cmark-gfm
version: ~> 0.7.1Then run:
shards installshard.yml
- Crystal
>= 1.0.0- License
- MIT
- Author
- Anton Maminov
Dependencies
Development Dependencies
- ameba*github: crystal-ameba/amebadev
- crystal_lib*github: crystal-lang/crystal_libdev
README
CommonMarker
Crystal wrapper for cmark-gfm, GitHub's fork of the reference parser for CommonMark.
This binding is statically linked with a specific version of cmark-gfm.
cmark-gfm supports simple parsing and rendering of markdown content.
If you want more features please check cr-cmark-gfm.
Installation
-
Add the dependency to your
shard.yml:dependencies: common_marker: github: mamantoha/crystal-cmark-gfm -
Run
shards install
Usage
require "common_marker"
text = File.read("README.md")
extensions = ["table", "strikethrough", "autolink", "tagfilter", "tasklist"]
options = ["unsafe"]
md = CommonMarker.new(text, options: options, extensions: extensions)
html = md.to_html
Extensions
CommonMarker initializer takes an optional third argument defining the extensions you want enabled as your CommonMark document is being processed. The documentation for these extensions are defined in this spec.
The available extensions are:
table- This provides support for tables.strikethrough- This provides support for strikethroughs.autolink- This provides support for automatically converting URLs to anchor tags.tagfilter- This escapes several "unsafe" HTML tags, causing them to not have any effect.tasklist- This provides support for task list items.
Development
cd ext && make && cd ..
crystal ./lib/crystal_lib/src/main.cr src/lib_cmark.cr.in > ./src/lib_cmark.cr
Contributing
- Fork it (https://github.com/mamantoha/crystal-cmark-gfm/fork)
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request
Contributors
- Anton Maminov - creator and maintainer
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This release
- Version
0.7.1- Tagged
- Apr 1, 2025
- Commit
4983d706bab6- Crystal
>= 1.0.0- Indexed
- yes
Dependents
Repository
github.com/mamantoha/crystal-cmark-gfm
Metadata
- Created
- Aug 12, 2026
- Updated
- Oct 20, 2026
- Synced
- Oct 20, 2026
- Versions
- 8