{"id":20811333,"url":"https://github.com/ciffelia/discord-md","last_synced_at":"2025-09-01T10:11:08.941Z","repository":{"id":43074137,"uuid":"401971123","full_name":"ciffelia/discord-md","owner":"ciffelia","description":"Parser and generator for Discord's markdown, written in Rust","archived":false,"fork":false,"pushed_at":"2025-08-15T18:34:12.000Z","size":156,"stargazers_count":17,"open_issues_count":5,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-08-17T09:51:33.591Z","etag":null,"topics":["crate","discord","markdown","parser","rust","rust-crate"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/discord-md","language":"Rust","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/ciffelia.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","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}},"created_at":"2021-09-01T07:28:33.000Z","updated_at":"2025-07-09T10:10:09.000Z","dependencies_parsed_at":"2025-05-07T09:45:15.737Z","dependency_job_id":null,"html_url":"https://github.com/ciffelia/discord-md","commit_stats":{"total_commits":81,"total_committers":2,"mean_commits":40.5,"dds":"0.024691358024691357","last_synced_commit":"894f9d843b0eed5dc0eaca177cc89afcd563ee5d"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/ciffelia/discord-md","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ciffelia%2Fdiscord-md","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ciffelia%2Fdiscord-md/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ciffelia%2Fdiscord-md/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ciffelia%2Fdiscord-md/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ciffelia","download_url":"https://codeload.github.com/ciffelia/discord-md/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ciffelia%2Fdiscord-md/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273105961,"owners_count":25046950,"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","status":"online","status_checked_at":"2025-09-01T02:00:09.058Z","response_time":120,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["crate","discord","markdown","parser","rust","rust-crate"],"created_at":"2024-11-17T20:40:18.273Z","updated_at":"2025-09-01T10:11:08.894Z","avatar_url":"https://github.com/ciffelia.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# discord-md\n\n[![CI status][ci badge]][ci link]\n[![crate version][crates.io badge]][crates.io link]\n[![docs online][docs badge]][docs link]\n[![MIT or Apache 2.0 Licenses][license badge]][license link]\n\nParser and generator for Discord's markdown, written in Rust\n\n## Example\n\n### Parsing\n\n```rust\nuse discord_md::ast::*;\nuse discord_md::parse;\n\nfn main() {\n  let message = \"You can write *italics text*, `*inline code*`, and more!\";\n\n  let ast = MarkdownDocument::new(vec![\n    MarkdownElement::Plain(Box::new(\n      Plain::new(\"You can write \")\n    )),\n    MarkdownElement::ItalicsStar(Box::new(\n      ItalicsStar::new(vec![\n        MarkdownElement::Plain(Box::new(\n          Plain::new(\"italics text\")\n        ))\n      ])\n    )),\n    MarkdownElement::Plain(Box::new(\n      Plain::new(\", \")\n    )),\n    MarkdownElement::OneLineCode(Box::new(\n      OneLineCode::new(\"*inline code*\")\n    )),\n    MarkdownElement::Plain(Box::new(\n      Plain::new(\", and more!\")\n    )),\n  ]);\n\n  assert_eq!(\n    parse(message),\n    ast\n  );\n}\n```\n\n### Generating\n\n```rust\nuse discord_md::ast::MarkdownDocument;\nuse discord_md::builder::*;\n\nfn main() {\n  let ast = MarkdownDocument::new(vec![\n    plain(\"generating \"),\n    one_line_code(\"markdown\"),\n    plain(\" is \"),\n    underline(vec![\n      bold(\"easy\"),\n      plain(\" and \"),\n      bold(\"fun!\"),\n    ]),\n  ]);\n\n  assert_eq!(\n    ast.to_string(),\n    \"generating `markdown` is __**easy** and **fun!**__\"\n  );\n}\n```\n\n## Features\n\n- Minimal dependencies (only [nom](https://github.com/rust-bakery/nom) and [derive_more](https://github.com/JelteF/derive_more))\n- Supports the following syntax:\n  - Italics (`*italics*`, `_italics_`)\n  - Bold (`**bold**`)\n  - Underline (`__underline__`)\n  - Strikethrough (`~~strikethrough~~`)\n  - Spoiler (`||spoiler||`)\n  - One line code (`` `one line code` ``)\n  - Multi line code\n    ````\n    ```sh\n    echo \"multi line\"\n    echo \"code\"\n    ```\n    ````\n  - Block Quote ([generator only](#parser-limitations))\n    ```\n    \u003e block quote\n    \u003e some text\n    ```\n\n## Installation\n\nAdd the following to your `Cargo.toml` file:\n\n```toml\n[dependencies]\ndiscord-md = \"3.0.0\"\n```\n\n## Documentation\n\n[Available at docs.rs][docs link]\n\n## Parser limitations\n\nThe parser tries to mimic the behavior of the official Discord client's markdown parser, but it's not perfect. \nThe following is the list of known limitations.\n\n- Block quotes are not parsed. `\u003e ` will be treated as plain text.\n- Nested emphasis, like `*italics **bold italics** italics*`, may not be parsed properly.\n- Intraword emphasis may not be handled properly. The parser treats `foo_bar_baz` as emphasis, while Discord's parser does not.\n- Escaping sequence will be treated as plain text.\n\n## License\n\nLicensed under either of\n\n* Apache License, Version 2.0\n  ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)\n* MIT license\n  ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)\n\nat your option.\n\n## Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally submitted\nfor inclusion in the work by you, as defined in the Apache-2.0 license, shall be\ndual licensed as above, without any additional terms or conditions.\n\n[ci badge]: https://github.com/ciffelia/discord-md/actions/workflows/ci.yml/badge.svg\n[ci link]: https://github.com/ciffelia/discord-md/actions/workflows/ci.yml\n\n[crates.io badge]: https://img.shields.io/crates/v/discord-md\n[crates.io link]: https://crates.io/crates/discord-md\n\n[docs badge]: https://img.shields.io/badge/docs-online-green\n[docs link]: https://docs.rs/discord-md\n\n[license badge]: https://img.shields.io/badge/license-MIT%20or%20Apache%202.0-blue\n[license link]: #license\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fciffelia%2Fdiscord-md","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fciffelia%2Fdiscord-md","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fciffelia%2Fdiscord-md/lists"}