Hi everyone,
I’d like to share crst, a reStructuredText (RST) parser I’ve been working on.
If you need to handle RST markup in Crystal; for documentation, content processing, or static sites, this shard provides a native solution that converts RST into HTML, DocBook XML, LaTeX, and plain text.
Key features:
- Output Formats: HTML5, DocBook XML, LaTeX, Plain Text.
- Standard Compliance: Supports lists, tables (simple & grid), footnotes, citations, and more.
- Extensible: You can define custom directives and roles.
- Safe: Configurable safety options for file inclusion.
Installation:
Add it to your shard.yml:
dependencies:
crst:
git: https://gitlab.com/renich/crst.git
Usage:
require “crst”
input = <<-RST
Hello World
===========
This is a paragraph with *emphasis*.
RST
puts Crst.to_html(input)
Links:
- Repository: Rene Bon Ćirić (Renich) / crst · GitLab
- Documentation: https://crst-257b81.gitlab.io/
Feedback and contributions are welcome.
Happy coding!