{"id":13825623,"url":"https://github.com/frostming/marko","last_synced_at":"2025-05-14T11:11:07.196Z","repository":{"id":39656920,"uuid":"143660809","full_name":"frostming/marko","owner":"frostming","description":"A markdown parser with high extensibility.","archived":false,"fork":false,"pushed_at":"2025-04-26T00:00:51.000Z","size":988,"stargazers_count":391,"open_issues_count":6,"forks_count":38,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-05-12T06:51:46.118Z","etag":null,"topics":["commonmark","extensible","markdown","parser","regexp"],"latest_commit_sha":null,"homepage":"https://marko-py.readthedocs.io/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/frostming.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","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,"zenodo":null},"funding":{"github":["frostming"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":null}},"created_at":"2018-08-06T01:19:56.000Z","updated_at":"2025-04-28T13:29:59.000Z","dependencies_parsed_at":"2023-12-15T01:22:54.940Z","dependency_job_id":"e1a2ab63-57fd-4d2e-86bc-ca5301ae7930","html_url":"https://github.com/frostming/marko","commit_stats":null,"previous_names":[],"tags_count":42,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frostming%2Fmarko","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frostming%2Fmarko/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frostming%2Fmarko/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frostming%2Fmarko/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/frostming","download_url":"https://codeload.github.com/frostming/marko/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254129494,"owners_count":22019628,"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","extensible","markdown","parser","regexp"],"created_at":"2024-08-04T09:01:24.389Z","updated_at":"2025-05-14T11:11:06.307Z","avatar_url":"https://github.com/frostming.png","language":"Python","funding_links":["https://github.com/sponsors/frostming"],"categories":["Python"],"sub_categories":[],"readme":"# 𝓜𝓪𝓻𝓴𝓸\n\n\u003e A markdown parser with high extensibility.\n\n[![PyPI](https://img.shields.io/pypi/v/marko.svg?logo=python\u0026logoColor=white)](https://pypi.org/project/marko/)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/marko.svg?logo=python\u0026logoColor=white)](https://pypi.org/project/marko/)\n[![Documentation Status](https://img.shields.io/readthedocs/marko-py.svg?logo=readthedocs)](https://marko-py.readthedocs.io/en/latest/?badge=latest)\n[![CommonMark Spec](https://img.shields.io/badge/CommonMark-0.31.2-blue.svg)][spec]\n\n![Build Status](https://github.com/frostming/marko/workflows/Tests/badge.svg)\n[![codecov](https://codecov.io/gh/frostming/marko/branch/master/graph/badge.svg)](https://codecov.io/gh/frostming/marko)\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/b785f5b3fa7c4d93a02372d31b3f73b1)](https://www.codacy.com/app/frostming/marko?utm_source=github.com\u0026utm_medium=referral\u0026utm_content=frostming/marko\u0026utm_campaign=Badge_Grade)\n\nMarko is a pure Python markdown parser that adheres to the specifications of [CommonMark's spec v0.31.2][spec]. It has been designed with high extensibility in mind, as detailed in the [Extensions](#extensions) section.\n\nMarko requires Python 3.8 or higher.\n\n## Why Marko\n\nOf all the Python markdown parsers available, a common issue is the difficulty for users to add their own features. Additionally, both [Python-Markdown][pymd] and [mistune][mistune] do not comply with CommonMark specifications. This has prompted me to develop a new markdown parser.\n\nMarko's compliance with the complex CommonMark specification can impact its performance. However, using a parser that does not adhere to this spec may result in unexpected rendering outcomes. According to benchmark results, Marko is three times slower than Python-Markdown but slightly faster than Commonmark-py and significantly slower than mistune. If prioritizing performance over spec compliance is crucial for you, it would be best to opt for another parser.\n\n[spec]: https://spec.commonmark.org/0.31.2/\n[pymd]: https://github.com/waylan/Python-Markdown\n[mistune]: https://github.com/lepture/mistune\n[cmpy]: https://github.com/rtfd/CommonMark-py\n\n## Use Marko\n\nThe installation is very simple:\n\n    $ pip install marko\n\nAnd to use it:\n\n```python\nimport marko\n\nprint(marko.convert(text))\n```\n\nMarko also provides a simple CLI, for example, to render a document and output to a html file:\n\n    $ cat my_article.md | marko \u003e my_article.html\n\n## Extensions\n\nIt is super easy to use an extension:\n\n```python\nfrom marko import Markdown\nfrom marko.ext.footnote import make_extension\n# Add footnote extension\nmarkdown = Markdown(extensions=[make_extension()])\n# Or you can just:\nmarkdown = Markdown(extensions=['footnote'])\n# Alternatively you can register an extension later\nmarkdown.use(make_extension())\n```\n\nAn example of using an extension with the command-line version of Marko:\n\n```\n$ cat this_has_footnote.txt | marko -e footnote \u003e hi_world.html\n```\n\nMarko is shipped with 4 extensions: `'footnote', 'toc' 'pangu', 'codehilite'`.\nThey are not included in CommonMark's spec but are common in other markdown parsers.\n\nMarko also provides a Github flavored markdown parser which can be found at `marko.ext.gfm.gfm`.\n\nPlease refer to [Extend Marko](https://marko-py.readthedocs.io/en/latest/extend.html) about how to\nwrite your own extension.\n\n## License\n\nMarko is released under [MIT License](LICENSE)\n\n## [Change Log](CHANGELOG.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrostming%2Fmarko","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffrostming%2Fmarko","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrostming%2Fmarko/lists"}