Shard Detail

common_marker v0.4.0

Minimal C bindings for parsing and rendering with cmark-gfm
crystal libcmark markdown gfm commonmark hacktoberfest

Install & Use

Add the following code to your project's shard.yml under:

dependencies to use in production
- OR -
development_dependencies to use in development

  github: mamantoha/crystal-cmark-gfm



Crystal CI GitHub release License

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.


  1. Add the dependency to your shard.yml:

        github: mamantoha/crystal-cmark-gfm
  2. Run shards install


require "common_marker"

text ="")
extensions = ["table", "strikethrough", "autolink", "tagfilter", "tasklist"]
options = ["unsafe"]
md =, options: options, extensions: extensions)
html = md.to_html


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.


cd ext && make && cd ..
crystal ./lib/crystal_lib/src/ -- src/ > ./src/


  1. Fork it (
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request