{"id":35031559,"url":"https://github.com/phoenixr-codes/syntect_minecraft_highlighting","last_synced_at":"2025-12-27T07:11:48.732Z","repository":{"id":261132678,"uuid":"883376813","full_name":"phoenixr-codes/syntect_minecraft_highlighting","owner":"phoenixr-codes","description":"Highlight code with Minecraft formatting","archived":false,"fork":false,"pushed_at":"2024-12-26T14:06:09.000Z","size":91,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-20T21:05:51.579Z","etag":null,"topics":["bedrock-edition","highlighting","java-edition","minecraft","syntect"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/syntect_minecraft_highlighting","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/phoenixr-codes.png","metadata":{"files":{"readme":"README.md","changelog":null,"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}},"created_at":"2024-11-04T21:23:26.000Z","updated_at":"2024-12-26T14:15:59.000Z","dependencies_parsed_at":"2024-11-04T21:49:33.152Z","dependency_job_id":"eeed0132-17df-46c6-a34f-0106b4b389c0","html_url":"https://github.com/phoenixr-codes/syntect_minecraft_highlighting","commit_stats":null,"previous_names":["phoenixr-codes/syntect_minecraft_highlighting"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/phoenixr-codes/syntect_minecraft_highlighting","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phoenixr-codes%2Fsyntect_minecraft_highlighting","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phoenixr-codes%2Fsyntect_minecraft_highlighting/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phoenixr-codes%2Fsyntect_minecraft_highlighting/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phoenixr-codes%2Fsyntect_minecraft_highlighting/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phoenixr-codes","download_url":"https://codeload.github.com/phoenixr-codes/syntect_minecraft_highlighting/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phoenixr-codes%2Fsyntect_minecraft_highlighting/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28075222,"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-12-27T02:00:05.897Z","response_time":58,"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":["bedrock-edition","highlighting","java-edition","minecraft","syntect"],"created_at":"2025-12-27T07:11:47.665Z","updated_at":"2025-12-27T07:11:48.727Z","avatar_url":"https://github.com/phoenixr-codes.png","language":"Rust","readme":"# syntect Minecraft Highlighting\n\nThis crate contains a function for highlighting styled fragments created by [syntect][] with\n[Minecraft Formatting][].\n\n![Example of highlighting in a book](./screenshots/book.jpg)\n\n\n## Example\n\n```rust\nuse syntect::easy::HighlightLines;\nuse syntect::highlighting::{Style, ThemeSet};\nuse syntect::parsing::SyntaxSet;\nuse syntect::util::LinesWithEndings;\nuse syntect_minecraft_highlighting::as_minecraft_bedrock_escaped;\n\nfn main() {\n    let ps = SyntaxSet::load_defaults_newlines();\n    let ts = ThemeSet::load_defaults();\n\n    let syntax = ps.find_syntax_by_extension(\"rs\").unwrap();\n    let s = \"pub struct Wow { hi: u64 }\\nfn blah() -\u003e u64 { 42 }\\n\";\n\n    let mut h = HighlightLines::new(syntax, \u0026ts.themes[\"base16-ocean.light\"]);\n    for line in LinesWithEndings::from(s) {\n        let ranges: Vec\u003c(Style, \u0026str)\u003e = h.highlight_line(line, \u0026ps).unwrap();\n        let escaped = as_minecraft_bedrock_escaped(\u0026ranges[..]);\n        println!(\"{}\", escaped);\n    }\n}\n```\n\n[Minecraft Formatting]: https://minecraft.wiki/w/Formatting_codes\n[syntect]: https://github.com/trishume/syntect\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphoenixr-codes%2Fsyntect_minecraft_highlighting","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphoenixr-codes%2Fsyntect_minecraft_highlighting","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphoenixr-codes%2Fsyntect_minecraft_highlighting/lists"}