From 874ea39ec0f278a48b26a172d877a094d17248eb Mon Sep 17 00:00:00 2001 From: Carter McBride <18412686+carterworks@users.noreply.github.com> Date: Tue, 1 Sep 2026 13:33:38 -0600 Subject: [PATCH] feat: add XML grammar --- README.md | 4 +- docs/index.html | 17 +- src/grammars/xml.js | 381 ++++++++++++++++++++++++++ test/fixtures/grammar-exhaustive.html | 12 + test/grammar-dependencies.spec.js | 2 + 5 files changed, 413 insertions(+), 3 deletions(-) create mode 100644 src/grammars/xml.js diff --git a/README.md b/README.md index cca0f63..0dc0e54 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ your markup stays clean and editable. - About 2 KiB compressed - No runtime dependencies -- 37 languages, loaded on demand +- 41 languages, loaded on demand - 10 bundled themes - Clean DOM with no token markup - Programmatic, automatic, and web component APIs @@ -191,7 +191,7 @@ MicroLighter includes these grammars: `git-diff`, `go`, `graphql`, `heex`, `html`, `ini`, `java`, `javascript`, `json`, `kotlin`, `lua`, `markdown`, `nginx`, `objective-c`, `perl`, `php`, `powershell`, `python`, `r`, `ruby`, `rust`, `scss`, `sql`, `svelte`, `swift`, `toml`, `tsx`, -`typescript`, `vue`, and `yaml`. +`typescript`, `vue`, `xml`, and `yaml`. Grammars are ES modules and load on demand. diff --git a/docs/index.html b/docs/index.html index 2aeab99..b8194cf 100644 --- a/docs/index.html +++ b/docs/index.html @@ -121,7 +121,7 @@

No more spans!

Blazingly fast!!

@@ -347,6 +347,7 @@

Supported languages

Web