{"id":21806678,"url":"https://github.com/hiphish/cl-cmark","last_synced_at":"2026-02-06T17:04:50.472Z","repository":{"id":40804911,"uuid":"502193114","full_name":"HiPhish/cl-cmark","owner":"HiPhish","description":"CommonMark implementation for Common Lisp based on libcmark. This system wraps the official reference implementation library, written in C, and provides lispy bindings for Common Lisp.","archived":false,"fork":false,"pushed_at":"2023-11-07T19:57:19.000Z","size":197,"stargazers_count":2,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-26T04:41:36.686Z","etag":null,"topics":["common-lisp","commonmark","lisp","mark"],"latest_commit_sha":null,"homepage":"https://gitlab.com/HiPhish/cl-cmark","language":"Common Lisp","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/HiPhish.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.rst","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"HiPhish","ko_fi":"HiPhish","liberapay":"HiPhish","custom":["monero:42MKtvm2XkS6pSKx2Dd4P9Wfty2pefHbfjU2y2YoG4AKeEaNzRwnDbNX4hzAWeDpR8ZeecutY9Tmv51GLp7Ltgaf7ReHpFT"]}},"created_at":"2022-06-10T22:10:01.000Z","updated_at":"2023-01-15T23:24:40.000Z","dependencies_parsed_at":"2024-11-27T12:39:16.605Z","dependency_job_id":null,"html_url":"https://github.com/HiPhish/cl-cmark","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HiPhish%2Fcl-cmark","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HiPhish%2Fcl-cmark/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HiPhish%2Fcl-cmark/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HiPhish%2Fcl-cmark/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HiPhish","download_url":"https://codeload.github.com/HiPhish/cl-cmark/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244759962,"owners_count":20505716,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["common-lisp","commonmark","lisp","mark"],"created_at":"2024-11-27T12:29:01.205Z","updated_at":"2026-02-06T17:04:50.327Z","avatar_url":"https://github.com/HiPhish.png","language":"Common Lisp","funding_links":["https://github.com/sponsors/HiPhish","https://ko-fi.com/HiPhish","https://liberapay.com/HiPhish","monero:42MKtvm2XkS6pSKx2Dd4P9Wfty2pefHbfjU2y2YoG4AKeEaNzRwnDbNX4hzAWeDpR8ZeecutY9Tmv51GLp7Ltgaf7ReHpFT"],"categories":[],"sub_categories":[],"readme":".. default-role:: code\n\n###################################\n libcmark bindings for Common Lisp\n###################################\n\nThis system implements bindings for the CommonMark_ reference implementation\nlibrary cmark_. It allows us to parse a CommonMark document into a tree of\nnodes, which we can then transform and traverse.\n\n\nInstallation\n############\n\nThis project uses ASDF_ as its build system. There are two systems provided:\n`cmark` (what you most likely want) and `libcmark.` In either case, you will\nneed the following:\n\n- A Lisp implementation which supports CFFI_\n- CFFI\n- The native cmark_ library installed on your system\n\nFor further dependencies please refer to the `cmark.asd`_ file.\n\n\nUsing\n#####\n\nThere are two separate systems. The `cmark` system is a high-level lispy system\nwhich most users will want to use. It provides most of the functionality of the\nC library using idiomatic and native Common Lisp concepts. It depends on the\n`libcmark` system.\n\nThe `libcmark` system is just a set of thin bindings over the C API using CFFI.\nIt is mostly a 1:1 binding and you will most likely only need it if you want to\ncreate your own high-level system on top of it. The `libcmark` system can be\nloaded without loading the `cmark` system.\n\nThe documentation is written in `GNU Texinfo`_, you can build it via the\nprovided makefile: `make doc` will build the documentation in HTML and GNU Info\nformats.\n\nExample\n=======\n\nLet us parse a small CommonMark document and print the node tree.\n\n.. code-block:: lisp\n\n   (defpackage #:cmark-user\n     (:use #:cl #:cmark))\n   (in-package #:cmark-user)\n\n   (defvar *document-tree* (cmark::parse-document \"Hello *world*!\")\n     \"Parse the document into a tree of nodes\")\n\n   (defun print-node (node \u0026optional (level 0))\n     \"Recursively print each node and its children at progressively deeper\n     levels\"\n     (format t \"~\u0026~A~A\"\n             (make-string (* 2 level) :initial-element #\\Space)\n             (class-name (class-of node)))\n     (dolist (child (cmark::node-children node))\n       (print-node child (1+ level))))\n\n   (print-node *DOCUMENT-TREE*)\n\nThis produces the following output:\n\n.. code-block::\n\n   DOCUMENT-NODE\n     PARAGRAPH-NODE\n       TEXT-NODE\n       EMPH-NODE\n         TEXT-NODE\n       TEXT-NODE\n\n\nRoadmap\n#######\n\nThe project is pretty much feature complete. There are a few things that would\nbe nice to have, but they are by no means blockers for a stable release. Here\nis a list of the remaining tasks:\n\n- Maybe custom printed representation for node classes?\n\n\nLicense\n#######\n\nReleased under the `BSD-2-Clause` license. See the LICENSE_ file for details.\n\n\n.. ----------------------------------------------------------------------------\n.. _CommonMark: https://commonmark.org/\n.. _cmark: https://github.com/commonmark/cmark\n.. _GNU Texinfo: https://www.gnu.org/software/texinfo/\n.. _ASDF: https://asdf.common-lisp.dev/\n.. _CFFI: https://cffi.common-lisp.dev/\n.. _cmark.asd: cmark.asd\n.. _LICENSE: LICENSE.txt\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhiphish%2Fcl-cmark","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhiphish%2Fcl-cmark","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhiphish%2Fcl-cmark/lists"}