Use case
We run an open education platform for industrial trades (Rails 8.1, importmap, Action Text + Lexxy). Our PLC programming lessons contain IEC 61131-3 Structured Text (ST) — the standard programming language of industrial automation. Today we mark those blocks as pascal (the conventional alias Rouge uses server-side), but the real language is ST, and highlighted ST samples are core content for this audience, not a nice-to-have.
What happens
The bundled Prism build ships ~20 grammars (bash, c, cpp, go, java, js, json, kotlin, php, python, ruby, rust, sql, swift, ts, xml, …). Neither iecst nor pascal is among them, so an ST code block stays unhighlighted — both live in the editor and in rendered content via the exported highlightCode().
And since the Prism instance isn't exported from the package, an app can't register additional grammars from prismjs on its own — there's no seam to extend the language set.
Why out-of-the-box support matters here
- ST is the lingua franca of PLC programming; industrial/technical education is a real audience for Action Text apps, well beyond web development.
- The people writing these lessons are trade experts, not JS developers. In a no-build importmap app there is no reasonable way for them (or us) to patch a vendored bundle.
- PrismJS already ships an
iecst grammar (“Structured Text (IEC 61131-3)”), so bundling it should be a build-config one-liner — and it would appear in the editor's code-language picker too.
Ask
- Include
iecst (and ideally pascal) in the bundled grammar set — first-class, out-of-the-box ST support.
- Additionally (and more generally): export the Prism instance or a small
registerLanguage hook, so apps can load any extra grammar from prismjs themselves.
Happy to send a PR for whichever direction you prefer.
Use case
We run an open education platform for industrial trades (Rails 8.1, importmap, Action Text + Lexxy). Our PLC programming lessons contain IEC 61131-3 Structured Text (ST) — the standard programming language of industrial automation. Today we mark those blocks as
pascal(the conventional alias Rouge uses server-side), but the real language is ST, and highlighted ST samples are core content for this audience, not a nice-to-have.What happens
The bundled Prism build ships ~20 grammars (bash, c, cpp, go, java, js, json, kotlin, php, python, ruby, rust, sql, swift, ts, xml, …). Neither
iecstnorpascalis among them, so an ST code block stays unhighlighted — both live in the editor and in rendered content via the exportedhighlightCode().And since the Prism instance isn't exported from the package, an app can't register additional grammars from
prismjson its own — there's no seam to extend the language set.Why out-of-the-box support matters here
iecstgrammar (“Structured Text (IEC 61131-3)”), so bundling it should be a build-config one-liner — and it would appear in the editor's code-language picker too.Ask
iecst(and ideallypascal) in the bundled grammar set — first-class, out-of-the-box ST support.registerLanguagehook, so apps can load any extra grammar fromprismjsthemselves.Happy to send a PR for whichever direction you prefer.