@exercism/highlightjs-euphoria
v1.0.1
Published
Euphoria (OpenEuphoria) language support for Highlight.js
Readme
highlightjs-euphoria ·

This repository contains a highlightjs plugin for the Euphoria language (OpenEuphoria 4).
It registers the language as euphoria, with the aliases openeuphoria and eu.
The keyword and built-in routine lists come from OpenEuphoria's include/euphoria/keywords.e.
The grammar uses no regex lookbehind, so it works in every browser that highlight.js supports.
Installation
To install the package, run:
npm install @exercism/highlightjs-euphoriaThen register the language:
import hljs from "highlight.js";
import hljsDefineEuphoria from "@exercism/highlightjs-euphoria";
hljs.registerLanguage("euphoria", hljsDefineEuphoria);Tests
To run the tests, run:
bun testThe tests in test/markup/ compare the HTML for each .txt file with its .expected file.
Some of them are example solutions from the Euphoria track.
To render every example solution in a checkout of the Euphoria track, run:
bin/render-examples ../euphoriaIt prints each token as «scope|text», so mis-highlighting is easy to spot.
Publish on NPM
To publish the package, run:
bun publishLocal development
First, install the dependencies:
bun installThen run:
bun devThis will start a Vite dev server that contains some Euphoria code and some highlighted text.
