cr-discount
Version, currently 0.2.03 versions
- 0.3.0latestJan 29, 2026
- 0.2.0not indexedJan 29, 2026
- 0.1.0not indexedJan 29, 2026
github.com/ralsina/cr-discount
A thin Crystal wrapper for discount, a markdown implementation
Nothing has been indexed for 0.2.0 yet. The tag is recorded, its shard.yml has not been read, so the manifest and dependency list below are empty because they are unknown rather than because they are absent.
Installation
# Add this to your shard.yml
dependencies:
cr-discount:
github: ralsina/cr-discount
version: ~> 0.2.0Then run:
shards installshard.yml
No shard.yml has been indexed for 0.2.0. You can read it on the repository.
Dependencies
Unknown: the shard.yml for this version has not been read yet.
README
This README is the one indexed from the repository at its latest ref, not from the tag for this version.
cr-discount
A crystal wrapper for Discount, a Markdown implementation
Installation
-
Add the dependency to your
shard.yml:dependencies: cr-discount: github: ralsina/cr-discount -
Run
shards install
Usage
require "cr-discount"
You can use Discount to compile markdown to HTML like this:
markdown = "This *is* **markdown**"
html = Discount.compile(markdown)
This is the whole API:
# Compile `text` from Markdown to HTML
def self.compile(
text : String,
with_toc : Bool = false,
flags = LibDiscount::MKD_FENCEDCODE | LibDiscount::MKD_TOC
)
with_tocadds a simple table of contents at the beginning of the returned HTMLflagscan be any combination of the flags in the discount docs
Development
I am not planning on developing this much further since it already does what I want :-)
Contributing
- Fork it (https://github.com/ralsina/cr-discount/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
- Roberto Alsina - 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.2.0- Tagged
- Jan 29, 2026
- Commit
91ddb70506fa- Indexed
- not yet
Dependents
Repository
github.com/ralsina/cr-discount
Metadata
- Created
- Aug 12, 2026
- Updated
- Oct 16, 2026
- Synced
- Oct 16, 2026
- Versions
- 3