diff --git a/packages/ui/package.json b/packages/ui/package.json index d95dc7d9..5b4174a1 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -38,7 +38,7 @@ "dependencies": { "file-saver": "^2.0.5", "highlight.js": "^11.0.0", - "highlightjs-cairo": "^0.2.0", + "highlightjs-cairo": "^0.3.0", "highlightjs-solidity": "^2.0.0", "sirv-cli": "^2.0.0", "tippy.js": "^6.3.1", diff --git a/packages/ui/src/cairo/highlightjs.ts b/packages/ui/src/cairo/highlightjs.ts index 7cff0fef..c94c0108 100644 --- a/packages/ui/src/cairo/highlightjs.ts +++ b/packages/ui/src/cairo/highlightjs.ts @@ -1,10 +1,7 @@ import hljs from 'highlight.js/lib/core'; -import rust from 'highlight.js/lib/languages/rust'; // @ts-ignore -//import hljsDefineCairo from 'highlightjs-cairo'; -//hljsDefineCairo(hljs); - -hljs.registerLanguage('cairo', rust); +import hljsDefineCairo from 'highlightjs-cairo'; +hljsDefineCairo(hljs); export default hljs; diff --git a/yarn.lock b/yarn.lock index 21eb9280..8b0fcdc5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3018,10 +3018,10 @@ highlight.js@^11.0.0: resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-11.9.0.tgz#04ab9ee43b52a41a047432c8103e2158a1b8b5b0" integrity sha512-fJ7cW7fQGCYAkgv4CPfwFHrfd/cLS4Hau96JuJ+ZTOWhjnhoeN1ub1tFmALm/+lW5z4WCAuAV9bm05AP0mS6Gw== -highlightjs-cairo@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/highlightjs-cairo/-/highlightjs-cairo-0.2.0.tgz#40458e238fa2e8785dbc31dd55cb8e6d615dc4ff" - integrity sha512-gO0934JCapWreOPAKsjC9RNUVV6cwSDrk3YMFaCjjeIKr1iAR1yi/ssevNgwTKWnkAVM1O7AAu4CmE/4qaBREQ== +highlightjs-cairo@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/highlightjs-cairo/-/highlightjs-cairo-0.3.0.tgz#946b8608b3edb42342033635c2c11c544f36686b" + integrity sha512-s0Lqpy/XDpi+IhJBSi3fxK47iybiTROMMvZF1XkYK/Ww6g6Rfz5+LencOrstdlMcUw86CguU8ZANr4/6/idIVA== dependencies: highlight.js "^11.0.0"