{"id":13740943,"url":"https://github.com/mscharley/gleam-commonmark","last_synced_at":"2025-04-14T23:07:39.994Z","repository":{"id":241603046,"uuid":"807142882","full_name":"mscharley/gleam-commonmark","owner":"mscharley","description":"CommonMark/Markdown implementation in Gleam, for the BEAM or JS","archived":false,"fork":false,"pushed_at":"2025-04-12T03:06:46.000Z","size":520,"stargazers_count":28,"open_issues_count":4,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-14T23:07:20.411Z","etag":null,"topics":["commonmark","gleam","markdown"],"latest_commit_sha":null,"homepage":"https://hexdocs.pm/commonmark","language":"Gleam","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mscharley.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","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":["mscharley"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":"mscharley","issuehunt":null,"otechie":null,"custom":null}},"created_at":"2024-05-28T14:56:44.000Z","updated_at":"2025-04-14T01:41:12.000Z","dependencies_parsed_at":"2025-01-18T02:30:44.595Z","dependency_job_id":"9b81310d-5460-4afa-9fe1-b2f273b5dc17","html_url":"https://github.com/mscharley/gleam-commonmark","commit_stats":null,"previous_names":["mscharley/gleam-commonmark"],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mscharley%2Fgleam-commonmark","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mscharley%2Fgleam-commonmark/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mscharley%2Fgleam-commonmark/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mscharley%2Fgleam-commonmark/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mscharley","download_url":"https://codeload.github.com/mscharley/gleam-commonmark/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248975316,"owners_count":21192209,"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":["commonmark","gleam","markdown"],"created_at":"2024-08-03T04:00:53.830Z","updated_at":"2025-04-14T23:07:39.975Z","avatar_url":"https://github.com/mscharley.png","language":"Gleam","funding_links":["https://github.com/sponsors/mscharley","https://liberapay.com/mscharley"],"categories":["Packages"],"sub_categories":["Formats"],"readme":"# commonmark\n\n[![Package Version](https://img.shields.io/hexpm/v/commonmark)](https://hex.pm/packages/commonmark)\n[![Hex Docs](https://img.shields.io/badge/hex-docs-ffaff3)](https://hexdocs.pm/commonmark/)\n![Erlang-compatible](https://img.shields.io/badge/target-erlang-b83998)\n![JavaScript-compatible](https://img.shields.io/badge/target-javascript-f1e05a)\n\n```sh\ngleam add commonmark\n```\n```gleam\nimport commonmark/html as commonmark\nimport gleam/io\n\npub fn main() {\n  \"# Hello, Gleam!\n\nThis is a test.\"\n  |\u003e commonmark.render_to_html\n  |\u003e io.println\n  // -\u003e \"\u003ch1\u003eHello, Gleam!\u003c/h1\u003e\\n\u003cp\u003eThis is a test.\u003c/p\u003e\\n\"\n}\n```\n\nFurther documentation can be found at \u003chttps://hexdocs.pm/commonmark\u003e.\n\n[You can view this README as an AST here.][readme-ast]\n\nThere is also an [interactive demo][demo] which you can use to test how this library interacts with your documents.\n\n[readme-ast]: https://github.com/mscharley/gleam-commonmark/tree/main/birdie_snapshots/common_mark_readme.accepted\n[demo]: https://mscharley.github.io/gleam-commonmark/\n\n## Syntax support\n\n\u003e [!WARNING]\n\u003e 🚧 This package is still heavily under construction 🚧\n\n### Legend\n\n* ✅ - Completed\n* 🚧 - In Progress\n* ❌ - Unsupported\n\n### CommonMark\n\nThe current version of CommonMark targetted is [0.31.2][commonmark].\n\n* ✅ Thematic breaks\n* ✅ ATX headings\n* ✅ Setext headings\n* ✅ Indented code blocks\n* ✅ Fenced code blocks\n* ❌ Link reference definitions\n* ✅ Paragraphs\n* ✅ Block quotes\n* 🚧 Ordered lists\n* 🚧 Unordered lists\n* ✅ Code spans\n* 🚧 Emphasis and strong emphasis\n* 🚧 Links\n* 🚧 Images\n* ✅ Autolinks\n* ✅ Hard line breaks\n* ✅ Soft line breaks\n\nRaw HTML features will be tackled last as the potential security issues around this need to be considered.\n\n* ❌ HTML blocks\n* ❌ Inline HTML\n\n[commonmark]: https://spec.commonmark.org/0.31.2/\n\n### Github Flavoured Markdown\n\nThe current version of GFM targetted is [0.29-gfm][gfm].\n\n* ❌ Tables\n* ✅ Strikethrough\n\n[gfm]: https://github.github.com/gfm/\n\n### Other extensions\n\n* ✅ [Github alerts][github-alert]\n\n[github-alert]: https://github.com/orgs/community/discussions/16925\n\n## Project structure\n\nThe `commonmark` package is just the parser as well as a simple HTML renderer which\nreturns a string, mostly to facilitate checking CommonMark spec compliance. Most\nlikely you want a specialised render for whatever framework you're using though.\n\nKnown renderer projects:\n\n* `commonmark/commonmark` is a CommonMark renderer, useful if you want to generate\n  an AST and write out a document based on it.\n* `commonmark/html` is a HTML renderer included as part of this package.\n\n## Development\n\n```sh\ngleam test              # Run the tests\ngleam shell             # Run an Erlang shell\n```\n\n### Tools\n\n```sh\ncd tools/\ngleam run -m benchmark  # Run the benchmarks\ngleam run -m codegen    # Run the codegen tasks (these are committed in the repo)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmscharley%2Fgleam-commonmark","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmscharley%2Fgleam-commonmark","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmscharley%2Fgleam-commonmark/lists"}