From 955e23a28649d0462e7a4563726b6629d22c6577 Mon Sep 17 00:00:00 2001 From: Erik Schierboom Date: Thu, 15 Aug 2024 09:03:00 +0200 Subject: [PATCH] Add highlightjs support for Arturo (#7030) * Add highlightjs support for Arturo * Fix yarn test --- app/javascript/utils/highlight.ts | 2 ++ jest.config.js | 2 +- package.json | 1 + yarn.lock | 5 +++++ 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/app/javascript/utils/highlight.ts b/app/javascript/utils/highlight.ts index e4f7cd8309..dafa0584eb 100644 --- a/app/javascript/utils/highlight.ts +++ b/app/javascript/utils/highlight.ts @@ -11,9 +11,11 @@ import setupRed from 'highlightjs-redbol' import setupChapel from 'highlightjs-chapel' import setupGDScript from '@exercism/highlightjs-gdscript' import setupJq from 'highlightjs-jq' +import setupArturo from '@exercism/highlightjs-arturo' if (isLookbehindSupported()) { highlighter.default.registerLanguage('abap', setupABAP) + highlighter.default.registerLanguage('arturo', setupArturo) highlighter.default.registerLanguage('cobol', setupCobol) highlighter.default.registerLanguage('bqn', setupBqn) highlighter.default.registerLanguage('zig', setupZig) diff --git a/jest.config.js b/jest.config.js index 1226db9eca..46e059b3a6 100644 --- a/jest.config.js +++ b/jest.config.js @@ -6,7 +6,7 @@ const config = { '^.+\\.[t|j]sx?$': 'babel-jest', }, transformIgnorePatterns: [ - 'node_modules/(?!(highlightjs-(bqn|zig|chapel|jq)|@ballerina/highlightjs-ballerina)/)', + 'node_modules/(?!(highlightjs-(bqn|zig|chapel|jq)|@ballerina/highlightjs-ballerina|@exercism/highlightjs-arturo)/)', ], moduleNameMapper: { '^[./a-zA-Z0-9$_-]+\\.svg$': diff --git a/package.json b/package.json index 11708aa701..377b922761 100644 --- a/package.json +++ b/package.json @@ -16,6 +16,7 @@ "@exercism/active-background": "^0.6.2", "@exercism/codemirror-lang-gleam": "^2.0.1", "@exercism/codemirror-lang-wren": "https://github.com/exercism/codemirror-lang-wren", + "@exercism/highlightjs-arturo": "^0.0.2", "@exercism/highlightjs-gdscript": "^0.0.1", "@exercism/twine2-story-format": "https://github.com/exercism/twine2-story-format.git", "@gleam-lang/highlight.js-gleam": "^1.0.0", diff --git a/yarn.lock b/yarn.lock index a457b0a6ca..96a815f851 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1485,6 +1485,11 @@ "@lezer/highlight" "^1.0.0" "@lezer/lr" "^1.0.0" +"@exercism/highlightjs-arturo@^0.0.2": + version "0.0.2" + resolved "https://registry.yarnpkg.com/@exercism/highlightjs-arturo/-/highlightjs-arturo-0.0.2.tgz#a053ffebda0a97caeb99654e9a77b792e11176a7" + integrity sha512-GFb7zlGB0aGr7cEdMQFCZejDE6zuc3+lHpZCll7euuBf4fHRo2kpt2BhST6m1z/E+KK8oPY9n8RpXNkNFHJfsg== + "@exercism/highlightjs-gdscript@^0.0.1": version "0.0.1" resolved "https://registry.yarnpkg.com/@exercism/highlightjs-gdscript/-/highlightjs-gdscript-0.0.1.tgz#1b10f0b394d406f6f9309ad66eec801ee399e671"