Markly
Ruby wrapper for libcmark, the CommonMark markdown parser.
Install / Use
/learn @ioquatix/MarklyREADME
Markly
A parser and abstract syntax tree for Markdown documents (CommonMark compatible) in Ruby. Originally forked from CommonMarker. It also includes extensions to the CommonMark spec as documented in the GitHub Flavored Markdown spec, such as support for tables, strikethroughs, and autolinking.
Motivation
This code base was originally forked from Commonmarker before they switched from cmark-gfm (C) to comrak (Rust). The original implementation provided access to the abstract syntax tree (AST), which is useful for building tools on top of Markdown. The Rust implementation did not provide this functionality, and so this fork was created to continue to provide these (and more) features.
It should be noted that commonmarker re-introduced AST access, but the original C implementation in this fork is 3-4x faster at processing Markdown into HTML and has a more advanced HTML generation and AST processing features.
Usage
Please see the project documentation for more details.
-
Getting Started - This guide explains now to install and use Markly.
-
Abstract Syntax Tree - This guide explains how to use Markly's abstract syntax tree (AST) to parse and manipulate Markdown documents.
-
Headings - This guide explains how to work with headings in Markly, including extracting them for navigation and handling duplicate heading text.
Releases
Please see the project releases for all releases.
v0.15.1
- Add agent context.
v0.15.0
- Introduced
Markly::Renderer::Headingsclass for extracting headings from markdown documents with automatic duplicate ID resolution. When rendering HTML withids: true, duplicate heading text now automatically gets unique IDs (deployment,deployment-2,deployment-3). TheHeadingsclass can also be used to extract headings for building navigation or table of contents.
v0.14.0
- Expose
Markly::Renderer::HTML.anchor_formethod to generate URL-safe anchors from headers.
Contributing
We welcome contributions to this project.
- Fork it.
- 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 new Pull Request.
Developer Certificate of Origin
In order to protect users of this project, we require all contributors to comply with the Developer Certificate of Origin. This ensures that all contributions are properly licensed and attributed.
Community Guidelines
This project is best served by a collaborative and respectful environment. Treat each other professionally, respect differing viewpoints, and engage constructively. Harassment, discrimination, or harmful behavior is not tolerated. Communicate clearly, listen actively, and support one another. If any issues arise, please inform the project maintainers.
Related Skills
node-connect
351.2kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
110.6kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
351.2kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
351.2kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
