Skip to content

Commit e180cbf

Browse files
ErikSchierboomiHiD
andauthored
Add futhark highlightjs support (#8155)
* Add futhark highlightjs support * Add to yarn --------- Co-authored-by: Jeremy Walker <jez.walker@gmail.com>
1 parent 70fcf89 commit e180cbf

4 files changed

Lines changed: 37 additions & 4 deletions

File tree

app/javascript/utils/highlight.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import setupArturo from '@exercism/highlightjs-arturo'
1515
import setupRoc from 'highlightjs-roc'
1616
import setupUiua from '@exercism/highlightjs-uiua'
1717
import setupJikiscript from '@exercism/highlightjs-jikiscript'
18+
import setupFuthark from '@exercism/highlightjs-futhark'
1819

1920
if (isLookbehindSupported()) {
2021
highlighter.default.registerLanguage('abap', setupABAP)
@@ -31,6 +32,7 @@ if (isLookbehindSupported()) {
3132
highlighter.default.registerLanguage('roc', setupRoc)
3233
highlighter.default.registerLanguage('uiua', setupUiua)
3334
highlighter.default.registerLanguage('jikiscript', setupJikiscript)
35+
highlighter.default.registerLanguage('futhark', setupFuthark)
3436
}
3537

3638
highlighter.default.configure({

jest.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const config = {
66
'^.+\\.[t|j]sx?$': 'babel-jest',
77
},
88
transformIgnorePatterns: [
9-
'node_modules/(?!(highlightjs-(bqn|zig|chapel|jq|roc|cobol)|@ballerina/highlightjs-ballerina|@exercism/highlightjs-(arturo|uiua|jikiscript))|@exercism/javascript-browser-test-runner|@marijn/find-cluster-break/)',
9+
'node_modules/(?!(highlightjs-(bqn|zig|chapel|jq|roc|cobol)|@ballerina/highlightjs-ballerina|@exercism/highlightjs-(arturo|futhark|uiua|jikiscript))|@exercism/javascript-browser-test-runner|@marijn/find-cluster-break/)',
1010
],
1111
moduleNameMapper: {
1212
'^[./a-zA-Z0-9$_-]+\\.svg$':

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
"@exercism/codemirror-lang-uiua": "^0.0.4",
2727
"@exercism/codemirror-lang-wren": "https://github.com/exercism/codemirror-lang-wren",
2828
"@exercism/highlightjs-arturo": "^0.0.2",
29+
"@exercism/highlightjs-futhark": "^0.0.4",
2930
"@exercism/highlightjs-gdscript": "^0.0.1",
3031
"@exercism/highlightjs-jikiscript": "^0.0.2",
3132
"@exercism/highlightjs-uiua": "^0.0.4",

yarn.lock

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1467,6 +1467,11 @@
14671467
resolved "https://registry.yarnpkg.com/@exercism/highlightjs-arturo/-/highlightjs-arturo-0.0.2.tgz#a053ffebda0a97caeb99654e9a77b792e11176a7"
14681468
integrity sha512-GFb7zlGB0aGr7cEdMQFCZejDE6zuc3+lHpZCll7euuBf4fHRo2kpt2BhST6m1z/E+KK8oPY9n8RpXNkNFHJfsg==
14691469

1470+
"@exercism/highlightjs-futhark@^0.0.4":
1471+
version "0.0.4"
1472+
resolved "https://registry.yarnpkg.com/@exercism/highlightjs-futhark/-/highlightjs-futhark-0.0.4.tgz#06a3c8198669d653206831896f4b6f5ae453d174"
1473+
integrity sha512-/QvO/yHoce14cdN47YBE91c8SB4Y8wA2zWYmIS0pSUGb8GIlR0nNoR/DeSXl5mySHoSz7Ov9dvU2Z/PUxtOgjw==
1474+
14701475
"@exercism/highlightjs-gdscript@^0.0.1":
14711476
version "0.0.1"
14721477
resolved "https://registry.yarnpkg.com/@exercism/highlightjs-gdscript/-/highlightjs-gdscript-0.0.1.tgz#1b10f0b394d406f6f9309ad66eec801ee399e671"
@@ -10717,7 +10722,7 @@ string-similarity-js@^2.1.4:
1071710722
resolved "https://registry.yarnpkg.com/string-similarity-js/-/string-similarity-js-2.1.4.tgz#73716330691946f2ebc435859aba8327afd31307"
1071810723
integrity sha512-uApODZNjCHGYROzDSAdCmAHf60L/pMDHnP/yk6TAbvGg7JSPZlSto/ceCI7hZEqzc53/juU2aOJFkM2yUVTMTA==
1071910724

10720-
"string-width-cjs@npm:string-width@^4.2.0", "string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
10725+
"string-width-cjs@npm:string-width@^4.2.0":
1072110726
version "4.2.3"
1072210727
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
1072310728
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
@@ -10735,6 +10740,15 @@ string-width@^1.0.1:
1073510740
is-fullwidth-code-point "^1.0.0"
1073610741
strip-ansi "^3.0.0"
1073710742

10743+
"string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
10744+
version "4.2.3"
10745+
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
10746+
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
10747+
dependencies:
10748+
emoji-regex "^8.0.0"
10749+
is-fullwidth-code-point "^3.0.0"
10750+
strip-ansi "^6.0.1"
10751+
1073810752
string-width@^2.0.0, string-width@^2.1.1:
1073910753
version "2.1.1"
1074010754
resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e"
@@ -10844,7 +10858,7 @@ stringify-package@^1.0.0, stringify-package@^1.0.1:
1084410858
resolved "https://registry.yarnpkg.com/stringify-package/-/stringify-package-1.0.1.tgz#e5aa3643e7f74d0f28628b72f3dad5cecfc3ba85"
1084510859
integrity sha512-sa4DUQsYciMP1xhKWGuFM04fB0LG/9DlluZoSVywUMRNvzid6XucHK0/90xGxRoHrAaROrcHK1aPKaijCtSrhg==
1084610860

10847-
"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1:
10861+
"strip-ansi-cjs@npm:strip-ansi@^6.0.1":
1084810862
version "6.0.1"
1084910863
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
1085010864
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
@@ -10872,6 +10886,13 @@ strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0:
1087210886
dependencies:
1087310887
ansi-regex "^4.1.0"
1087410888

10889+
strip-ansi@^6.0.0, strip-ansi@^6.0.1:
10890+
version "6.0.1"
10891+
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
10892+
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
10893+
dependencies:
10894+
ansi-regex "^5.0.1"
10895+
1087510896
strip-ansi@^7.0.1:
1087610897
version "7.1.0"
1087710898
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.1.0.tgz#d5b6568ca689d8561370b0707685d22434faff45"
@@ -11820,7 +11841,7 @@ worker-farm@^1.6.0, worker-farm@^1.7.0:
1182011841
dependencies:
1182111842
errno "~0.1.7"
1182211843

11823-
"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0:
11844+
"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0":
1182411845
version "7.0.0"
1182511846
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
1182611847
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
@@ -11838,6 +11859,15 @@ wrap-ansi@^5.1.0:
1183811859
string-width "^3.0.0"
1183911860
strip-ansi "^5.0.0"
1184011861

11862+
wrap-ansi@^7.0.0:
11863+
version "7.0.0"
11864+
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
11865+
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
11866+
dependencies:
11867+
ansi-styles "^4.0.0"
11868+
string-width "^4.1.0"
11869+
strip-ansi "^6.0.0"
11870+
1184111871
wrap-ansi@^8.1.0:
1184211872
version "8.1.0"
1184311873
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214"

0 commit comments

Comments
 (0)