{"id":15030985,"url":"https://github.com/noties/markwon","last_synced_at":"2025-05-14T06:13:37.706Z","repository":{"id":41176424,"uuid":"91698982","full_name":"noties/Markwon","owner":"noties","description":"Android markdown library (no WebView)","archived":false,"fork":false,"pushed_at":"2024-04-17T06:35:00.000Z","size":18011,"stargazers_count":2990,"open_issues_count":83,"forks_count":345,"subscribers_count":36,"default_branch":"master","last_synced_at":"2025-04-03T20:35:51.193Z","etag":null,"topics":["android","markdown"],"latest_commit_sha":null,"homepage":"https://noties.io/Markwon/","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/noties.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},"funding":{"custom":["https://paypal.me/dimitryivanov"]}},"created_at":"2017-05-18T13:50:21.000Z","updated_at":"2025-04-03T09:15:26.000Z","dependencies_parsed_at":"2024-06-20T23:26:29.547Z","dependency_job_id":null,"html_url":"https://github.com/noties/Markwon","commit_stats":null,"previous_names":[],"tags_count":33,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noties%2FMarkwon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noties%2FMarkwon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noties%2FMarkwon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noties%2FMarkwon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/noties","download_url":"https://codeload.github.com/noties/Markwon/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248322609,"owners_count":21084336,"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":["android","markdown"],"created_at":"2024-09-24T20:14:40.544Z","updated_at":"2025-04-11T00:50:23.378Z","avatar_url":"https://github.com/noties.png","language":"Java","funding_links":["https://paypal.me/dimitryivanov"],"categories":[],"sub_categories":[],"readme":"![logo](./art/markwon_logo.png)\n\n# Markwon\n\n[![Build](https://github.com/noties/Markwon/workflows/Build/badge.svg)](https://github.com/noties/Markwon/actions)\n\n**Markwon** is a markdown library for Android. It parses markdown\nfollowing [commonmark-spec] with the help of amazing [commonmark-java]\nlibrary and renders result as _Android-native_ Spannables. **No HTML**\nis involved as an intermediate step. \u003cu\u003e**No WebView** is required\u003c/u\u003e.\nIt's extremely fast, feature-rich and extensible.\n\nIt gives ability to display markdown in all TextView widgets\n(**TextView**, **Button**, **Switch**, **CheckBox**, etc), **Toasts**\nand all other places that accept **Spanned content**. Library provides\nreasonable defaults to display style of a markdown content but also \ngives all the means to tweak the appearance if desired. All markdown\nfeatures listed in [commonmark-spec] are supported\n(including support for **inlined/block HTML code**, **markdown tables**,\n**images** and **syntax highlight**).\n\n`Markwon` comes with a [sample application](./app-sample/). It is a\ncollection of library usages that comes with search and source code for\neach code sample.\n\nSince version **4.2.0** **Markwon** comes with an [editor](./markwon-editor/) to _highlight_ markdown input\nas user types (for example in **EditText**).\n\n[commonmark-spec]: https://spec.commonmark.org/0.28/\n[commonmark-java]: https://github.com/atlassian/commonmark-java/blob/master/README.md\n\n## Installation\n\n![stable](https://img.shields.io/maven-central/v/io.noties.markwon/core.svg?label=stable)\n![snapshot](https://img.shields.io/nexus/s/https/oss.sonatype.org/io.noties.markwon/core.svg?label=snapshot)\n\n```kotlin\nimplementation \"io.noties.markwon:core:${markwonVersion}\"\n```\n\nFull list of available artifacts is present in the [install section](https://noties.github.io/Markwon/docs/v4/install.html)\nof the [documentation] web-site.\n\nPlease visit [documentation] web-site for further reference.\n\n\n\u003e You can find previous version of Markwon in [2.x.x](https://github.com/noties/Markwon/tree/2.x.x)\nand [3.x.x](https://github.com/noties/Markwon/tree/3.x.x) branches\n\n\n## Supported markdown features:\n* Emphasis (`*`, `_`)\n* Strong emphasis (`**`, `__`)\n* Strike-through (`~~`)\n* Headers (`#{1,6}`)\n* Links (`[]()` \u0026\u0026 `[][]`)\n* Images\n* Thematic break (`---`, `***`, `___`)\n* Quotes \u0026 nested quotes (`\u003e{1,}`)\n* Ordered \u0026 non-ordered lists \u0026 nested ones\n* Inline code\n* Code blocks\n* Tables (*with limitations*)\n* Syntax highlight\n* LaTeX formulas\n* HTML\n  * Emphasis (`\u003ci\u003e`, `\u003cem\u003e`, `\u003ccite\u003e`, `\u003cdfn\u003e`)\n  * Strong emphasis (`\u003cb\u003e`, `\u003cstrong\u003e`)\n  * SuperScript (`\u003csup\u003e`)\n  * SubScript (`\u003csub\u003e`)\n  * Underline (`\u003cu\u003e`, `ins`)\n  * Strike-through (`\u003cs\u003e`, `\u003cstrike\u003e`, `\u003cdel\u003e`)\n  * Link (`a`)\n  * Lists (`ul`, `ol`)\n  * Images (`img` will require configured image loader)\n  * Blockquote (`blockquote`)\n  * Heading (`h1`, `h2`, `h3`, `h4`, `h5`, `h6`)\n  * there is support to render any HTML tag\n* Task lists:\n- [ ] Not _done_\n  - [X] **Done** with `X`\n  - [x] ~~and~~ **or** small `x`\n---\n\n## Screenshots\n\nTaken with default configuration (except for image loading) in [sample app](./app-sample/):\n\n\u003ca href=\"./art/mw_light_01.png\"\u003e\u003cimg src=\"./art/mw_light_01.png\" width=\"30%\" /\u003e\u003c/a\u003e\n\u003ca href=\"./art/mw_light_02.png\"\u003e\u003cimg src=\"./art/mw_light_02.png\" width=\"30%\" /\u003e\u003c/a\u003e\n\u003ca href=\"./art/mw_light_03.png\"\u003e\u003cimg src=\"./art/mw_light_03.png\" width=\"30%\" /\u003e\u003c/a\u003e\n\u003ca href=\"./art/mw_dark_01.png\"\u003e\u003cimg src=\"./art/mw_dark_01.png\" width=\"30%\" /\u003e\u003c/a\u003e\n\nBy default configuration uses TextView textColor for styling, so changing textColor changes style\n\n---\n\n## Documentation\n\nPlease visit [documentation] web-site for reference\n\n[documentation]: https://noties.github.io/Markwon\n\n\n## Consulting\nPaid consulting is available. Please reach me out at [markwon+consulting[at]noties.io](mailto:markwon+consulting@noties.io)\nto discuss your idea or a project\n\n---\n\n# Demo\nBased on [this cheatsheet][cheatsheet]\n\n---\n\n## Headers\n---\n# Header 1\n## Header 2\n### Header 3\n#### Header 4\n##### Header 5\n###### Header 6\n---\n\n## Emphasis\n\nEmphasis, aka italics, with *asterisks* or _underscores_.\n\nStrong emphasis, aka bold, with **asterisks** or __underscores__.\n\nCombined emphasis with **asterisks and _underscores_**.\n\nStrikethrough uses two tildes. ~~Scratch this.~~\n\n---\n\n## Lists\n1. First ordered list item\n2. Another item\n  * Unordered sub-list.\n1. Actual numbers don't matter, just that it's a number\n  1. Ordered sub-list\n4. And another item.\n\n   You can have properly indented paragraphs within list items. Notice the blank line above, and the leading spaces (at least one, but we'll use three here to also align the raw Markdown).\n\n   To have a line break without a paragraph, you will need to use two trailing spaces.\n   Note that this line is separate, but within the same paragraph.\n   (This is contrary to the typical GFM line break behaviour, where trailing spaces are not required.)\n\n* Unordered list can use asterisks\n- Or minuses\n+ Or pluses\n\n---\n\n## Links\n\n[I'm an inline-style link](https://www.google.com)\n\n[I'm a reference-style link][Arbitrary case-insensitive reference text]\n\n[I'm a relative reference to a repository file](../blob/master/LICENSE)\n\n[You can use numbers for reference-style link definitions][1]\n\nOr leave it empty and use the [link text itself].\n\n---\n\n## Code\n\nInline `code` has `back-ticks around` it.\n\n```javascript\nvar s = \"JavaScript syntax highlighting\";\nalert(s);\n```\n\n```python\ns = \"Python syntax highlighting\"\nprint s\n```\n\n```java\n/**\n * Helper method to obtain a Parser with registered strike-through \u0026amp; table extensions\n * \u0026amp; task lists (added in 1.0.1)\n *\n * @return a Parser instance that is supported by this library\n * @since 1.0.0\n */\n@NonNull\npublic static Parser createParser() {\n  return new Parser.Builder()\n      .extensions(Arrays.asList(\n          StrikethroughExtension.create(),\n          TablesExtension.create(),\n          TaskListExtension.create()\n      ))\n      .build();\n}\n```\n\n```xml\n\u003cScrollView\n  android:id=\"@+id/scroll_view\"\n  android:layout_width=\"match_parent\"\n  android:layout_height=\"match_parent\"\n  android:layout_marginTop=\"?android:attr/actionBarSize\"\u003e\n\n  \u003cTextView\n    android:id=\"@+id/text\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"wrap_content\"\n    android:layout_margin=\"16dip\"\n    android:lineSpacingExtra=\"2dip\"\n    android:textSize=\"16sp\"\n    tools:text=\"yo\\nman\" /\u003e\n\n\u003c/ScrollView\u003e\n```\n\n```\nNo language indicated, so no syntax highlighting.\nBut let's throw in a \u003cb\u003etag\u003c/b\u003e.\n```\n\n---\n\n## Tables\n\nColons can be used to align columns.\n\n| Tables        | Are           | Cool  |\n| ------------- |:-------------:| -----:|\n| col 3 is      | right-aligned | $1600 |\n| col 2 is      | centered      |   $12 |\n| zebra stripes | are neat      |    $1 |\n\nThere must be at least 3 dashes separating each header cell.\nThe outer pipes (|) are optional, and you don't need to make the\nraw Markdown line up prettily. You can also use inline Markdown.\n\nMarkdown | Less | Pretty\n--- | --- | ---\n*Still* | `renders` | **nicely**\n1 | 2 | 3\n\n---\n\n## Blockquotes\n\n\u003e Blockquotes are very handy in email to emulate reply text.\n\u003e This line is part of the same quote.\n\nQuote break.\n\n\u003e This is a very long line that will still be quoted properly when it wraps. Oh boy let's keep writing to make sure this is long enough to actually wrap for everyone. Oh, you can *put* **Markdown** into a blockquote.\n\nNested quotes\n\u003e Hello!\n\u003e\u003e And to you!\n\n---\n\n## Inline HTML\n\n```html\n\u003cu\u003e\u003ci\u003eH\u003csup\u003eT\u003csub\u003eM\u003c/sub\u003e\u003c/sup\u003e\u003cb\u003e\u003cs\u003eL\u003c/s\u003e\u003c/b\u003e\u003c/i\u003e\u003c/u\u003e\n```\n\n\u003cu\u003e\u003ci\u003eH\u003csup\u003eT\u003csub\u003eM\u003c/sub\u003e\u003c/sup\u003e\u003cb\u003e\u003cs\u003eL\u003c/s\u003e\u003c/b\u003e\u003c/i\u003e\u003c/u\u003e\n\n---\n\n## Horizontal Rule\n\nThree or more...\n\n---\n\nHyphens (`-`)\n\n***\n\nAsterisks (`*`)\n\n___\n\nUnderscores (`_`)\n\n\n## License\n\n```\n  Copyright 2019 Dimitry Ivanov (legal@noties.io)\n\n  Licensed under the Apache License, Version 2.0 (the \"License\");\n  you may not use this file except in compliance with the License.\n  You may obtain a copy of the License at\n\n      http://www.apache.org/licenses/LICENSE-2.0\n\n  Unless required by applicable law or agreed to in writing, software\n  distributed under the License is distributed on an \"AS IS\" BASIS,\n  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  See the License for the specific language governing permissions and\n  limitations under the License.\n```\n\n[cheatsheet]: https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet\n\n[arbitrary case-insensitive reference text]: https://www.mozilla.org\n[1]: http://slashdot.org\n[link text itself]: http://www.reddit.com\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnoties%2Fmarkwon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnoties%2Fmarkwon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnoties%2Fmarkwon/lists"}