lighter
lighter copied to clipboard
The syntax highlighter used by Code Hike.
`mmd` = MermaidJS, but I get that you don't have a language for that. ``` Unhandled Runtime Error Error: Unknown language: mmd Call Stack eval (rsc)/node_modules/@code-hike/lighter/dist/index.esm.mjs (1:729565) Array.map HB (rsc)/node_modules/@code-hike/lighter/dist/index.esm.mjs...
This fails ```` ```jsx // !Fold[/className="([^"]+)"/g] function Foo() { return ( hey ) } ``` ```` with: `Error: Invalid RegExp string: [/className="([^"]`
```js highlight("console.log(1)", "js", "github-from-css", { scopes: true }) ``` returns ```js "style": { "color": "#000000" }, ``` instead of the CSS var names
This is not this project itself issue, but I will find a way to solve the problem and post it here ```shell /Users/himself65/Library/Caches/fnm_multishells/85522_1705359274939/bin/pnpm run build > [email protected] build /Users/himself65/Code/waku/packages/website >...
The current behaviour is a good default as it mostly just works across all environments. However there are cases where I want to be in control of how/when the grammars...
Use shikijs/textmate-grammars-themes, as that's where grammars are now. I updated the script to support the different repo and ran it. Looks like this removes: - `lisp` in favor of `common-lisp`...
Currently, using Code Hike in a Next.js project that serves code snippets for certain SDKs. Issue is that when trying to use interpolated strings in ruby, the highlight is not...
`yarn regenerate` updates the "file system" grammars but not the fallback grammars from the network.
When rendering `` in a server component, with cacheComponents enabled, I get this error >Error: Route "/blog/[slug]" used `Date.now()` before accessing either uncached data (e.g. `fetch()`) or Request data (e.g....
This function is being exported and used downstream in some projects that rely on next.js 16's cache components. This doesn't allow using Date.now() and requires the use of performance.now() instead....