{"id":51842960,"url":"https://github.com/mbolli/tempest-highlight-ron","last_synced_at":"2026-07-23T08:30:55.428Z","repository":{"id":364996495,"uuid":"1270061730","full_name":"mbolli/tempest-highlight-ron","owner":"mbolli","description":"RON (Readable Object Notation) syntax highlighting for tempest/highlight — parser-backed, role-aware highlighting of keys, values, numbers, literals \u0026 structure via the real RON parser (mbolli/php-ron).","archived":false,"fork":false,"pushed_at":"2026-06-15T11:17:48.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-15T13:04:28.061Z","etag":null,"topics":["code-highlighting","php","readable-object-notation","ron","syntax-highlighting","tempest","tempest-highlight"],"latest_commit_sha":null,"homepage":null,"language":"PHP","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/mbolli.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-15T10:51:32.000Z","updated_at":"2026-06-15T11:17:47.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/mbolli/tempest-highlight-ron","commit_stats":null,"previous_names":["mbolli/tempest-highlight-ron"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/mbolli/tempest-highlight-ron","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbolli%2Ftempest-highlight-ron","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbolli%2Ftempest-highlight-ron/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbolli%2Ftempest-highlight-ron/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbolli%2Ftempest-highlight-ron/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mbolli","download_url":"https://codeload.github.com/mbolli/tempest-highlight-ron/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbolli%2Ftempest-highlight-ron/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35796815,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-07-20T02:08:10.276Z","status":"online","status_checked_at":"2026-07-23T02:00:06.683Z","response_time":57,"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":["code-highlighting","php","readable-object-notation","ron","syntax-highlighting","tempest","tempest-highlight"],"created_at":"2026-07-23T08:30:54.935Z","updated_at":"2026-07-23T08:30:55.422Z","avatar_url":"https://github.com/mbolli.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tempest-highlight-ron\n\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/mbolli/tempest-highlight-ron.svg?style=flat-square)](https://packagist.org/packages/mbolli/tempest-highlight-ron)\n[![PHP Version](https://img.shields.io/packagist/php-v/mbolli/tempest-highlight-ron.svg?style=flat-square)](https://packagist.org/packages/mbolli/tempest-highlight-ron)\n[![Total Downloads](https://img.shields.io/packagist/dt/mbolli/tempest-highlight-ron.svg?style=flat-square)](https://packagist.org/packages/mbolli/tempest-highlight-ron)\n[![PHPStan Level 10](https://img.shields.io/badge/PHPStan-level%2010-brightgreen.svg?style=flat-square)](https://phpstan.org/)\n[![License](https://img.shields.io/packagist/l/mbolli/tempest-highlight-ron.svg?style=flat-square)](LICENSE)\n\n[RON (Readable Object Notation)](https://github.com/starfederation/ron) language support for\n[tempest/highlight](https://github.com/tempestphp/highlight).\n\nUnlike a regex grammar, this plugin tokenizes with the **real RON parser**\n([mbolli/php-ron](https://github.com/mbolli/php-ron)), so highlighting is byte-exact and\ncontext-aware: keys are distinguished from values even though RON has no `:`/`=` separator,\nand repeated-quote strings (`''''' `, `\"\"a \"quoted\" phrase\"\"`) are spanned correctly.\n\n## Installation\n\n```bash\ncomposer require mbolli/tempest-highlight-ron\n```\n\n## Usage\n\n```php\nuse Tempest\\Highlight\\Highlighter;\nuse Mbolli\\TempestHighlightRon\\RonLanguage;\n\n$highlighter = new Highlighter();\n$highlighter-\u003eaddLanguage(new RonLanguage());\n\necho $highlighter-\u003eparse($ron, 'ron');\n```\n\nRegistering the language as `ron` also highlights fenced ` ```ron ` blocks in markdown\nrendered through tempest/highlight.\n\n## What gets highlighted\n\nFor example RON like:\n\n```ron\nusers [\n  {id 100 name Ada roles [admin writer] active true}\n]\nsettings {retry {max 3} tags [llm json]}\n```\n\n| RON construct                                   | Role        | tempest token | CSS class      |\n|-------------------------------------------------|-------------|---------------|----------------|\n| `{` `}` `[` `]`                                 | punctuation | `PROPERTY`    | `hl-property`  |\n| object keys (bare/quoted, elided or braced)     | key         | `KEYWORD`     | `hl-keyword`   |\n| string values (bare, quoted, repeated-quote)    | string      | `VALUE`       | `hl-value`     |\n| numbers (`100`, `-12.5e+2`)                     | number      | `NUMBER`      | `hl-number`    |\n| `true` / `false` / `null`                       | literal     | `LITERAL`     | `hl-literal`   |\n\nBecause classification comes from the parser, `'true'` (quoted) is a string, a key named\n`true` is a key, and a bare `123` in key position stays a key — none are mis-coloured.\n\n## How it works\n\n`RonLanguage` adds five `Pattern`s on top of tempest's base language. Each delegates to\n`Mbolli\\Ron\\Ron::tokenize()`, which returns role-aware source spans; the spans are handed to\ntempest in `PREG_OFFSET_CAPTURE` shape. Tokenization is memoized per content string, so the\nsource is lexed once per parse regardless of how many patterns run. `Ron::tokenize()` is\nlenient — malformed RON never throws, it just highlights as much as it can classify.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmbolli%2Ftempest-highlight-ron","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmbolli%2Ftempest-highlight-ron","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmbolli%2Ftempest-highlight-ron/lists"}