PHPackages                             mbolli/tempest-highlight-ron - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. mbolli/tempest-highlight-ron

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

mbolli/tempest-highlight-ron
============================

RON (Readable Object Notation) language support for tempest/highlight — parser-backed, role-aware highlighting of keys, values, numbers, literals, and structure.

v1.0.2(1mo ago)05↓50%MITPHPPHP ^8.4

Since Jun 15Pushed 1mo agoCompare

[ Source](https://github.com/mbolli/tempest-highlight-ron)[ Packagist](https://packagist.org/packages/mbolli/tempest-highlight-ron)[ RSS](/packages/mbolli-tempest-highlight-ron/feed)WikiDiscussions main Synced 2w ago

READMEChangelogDependencies (5)Versions (4)Used By (0)

tempest-highlight-ron
=====================

[](#tempest-highlight-ron)

[![Latest Version on Packagist](https://camo.githubusercontent.com/769ebeedddd30a1f788d4778e92e3a9c25714aa6826116525478071dfe0132d8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d626f6c6c692f74656d706573742d686967686c696768742d726f6e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/mbolli/tempest-highlight-ron)[![PHP Version](https://camo.githubusercontent.com/ecb207132cc3d660009c6d0c8cd22b6c76263fc4ca253035b7e4940432fa2109/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6d626f6c6c692f74656d706573742d686967686c696768742d726f6e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/mbolli/tempest-highlight-ron)[![Total Downloads](https://camo.githubusercontent.com/e74057ad3674cd5e7d027f6275b11a1ec18acef07034ce90184d8f2986bf3e15/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d626f6c6c692f74656d706573742d686967686c696768742d726f6e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/mbolli/tempest-highlight-ron)[![PHPStan Level 10](https://camo.githubusercontent.com/65c9bbcae389e4ca189f0239aa80ea655e986c4d7d4d586a15927056765c173f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048505374616e2d6c6576656c25323031302d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](https://phpstan.org/)[![License](https://camo.githubusercontent.com/19339c5076aeac2d3833549584641771b1345d36f84c819dda8e201ea342cc87/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6d626f6c6c692f74656d706573742d686967686c696768742d726f6e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)

[RON (Readable Object Notation)](https://github.com/starfederation/ron) language support for [tempest/highlight](https://github.com/tempestphp/highlight).

Unlike a regex grammar, this plugin tokenizes with the **real RON parser**([mbolli/php-ron](https://github.com/mbolli/php-ron)), so highlighting is byte-exact and context-aware: keys are distinguished from values even though RON has no `:`/`=` separator, and repeated-quote strings (`''''' `, `""a "quoted" phrase""`) are spanned correctly.

Installation
------------

[](#installation)

```
composer require mbolli/tempest-highlight-ron
```

Usage
-----

[](#usage)

```
use Tempest\Highlight\Highlighter;
use Mbolli\TempestHighlightRon\RonLanguage;

$highlighter = new Highlighter();
$highlighter->addLanguage(new RonLanguage());

echo $highlighter->parse($ron, 'ron');
```

Registering the language as `ron` also highlights fenced ````ron` blocks in markdown rendered through tempest/highlight.

What gets highlighted
---------------------

[](#what-gets-highlighted)

For example RON like:

```
users [
  {id 100 name Ada roles [admin writer] active true}
]
settings {retry {max 3} tags [llm json]}
```

RON constructRoletempest tokenCSS class`{` `}` `[` `]`punctuation`PROPERTY``hl-property`object keys (bare/quoted, elided or braced)key`KEYWORD``hl-keyword`string values (bare, quoted, repeated-quote)string`VALUE``hl-value`numbers (`100`, `-12.5e+2`)number`NUMBER``hl-number``true` / `false` / `null`literal`LITERAL``hl-literal`Because classification comes from the parser, `'true'` (quoted) is a string, a key named `true` is a key, and a bare `123` in key position stays a key — none are mis-coloured.

How it works
------------

[](#how-it-works)

`RonLanguage` adds five `Pattern`s on top of tempest's base language. Each delegates to `Mbolli\Ron\Ron::tokenize()`, which returns role-aware source spans; the spans are handed to tempest in `PREG_OFFSET_CAPTURE` shape. Tokenization is memoized per content string, so the source is lexed once per parse regardless of how many patterns run. `Ron::tokenize()` is lenient — malformed RON never throws, it just highlights as much as it can classify.

License
-------

[](#license)

MIT

###  Health Score

41

—

FairBetter than 87% of packages

Maintenance90

Actively maintained with recent releases

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

3

Last Release

45d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/87558ba85a089fa7793e2b315085e9b17c355f867c34b782b7da81fd6d84946d?d=identicon)[mbolli](/maintainers/mbolli)

---

Top Contributors

[![mbolli](https://avatars.githubusercontent.com/u/722725?v=4)](https://github.com/mbolli "mbolli (7 commits)")

---

Tags

code-highlightingphpreadable-object-notationronsyntax-highlightingtempesttempest-highlightsyntax-highlightingrontempest-highlightreadable-object-notation

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/mbolli-tempest-highlight-ron/health.svg)

```
[![Health](https://phpackages.com/badges/mbolli-tempest-highlight-ron/health.svg)](https://phpackages.com/packages/mbolli-tempest-highlight-ron)
```

###  Alternatives

[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k17](/packages/tempest-framework)[tempest/console

The console component provides a way to build commands within the framework or standalone command-line applications.

7249.5k22](/packages/tempest-console)[torchlight/torchlight-commonmark

A Commonmark extension for Torchlight, the syntax highlighting API.

28272.1k6](/packages/torchlight-torchlight-commonmark)[mako/framework

Mako Framework

255172.7k32](/packages/mako-framework)[sauladam/shipment-tracker

Parses tracking information for several carriers, like UPS, USPS, DHL and GLS by simply scraping the data. No need for any kind of API access.

9843.5k](/packages/sauladam-shipment-tracker)[torchlight/torchlight-jigsaw

A Torchlight client for the static site generator Jigsaw

1515.6k](/packages/torchlight-torchlight-jigsaw)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
