I am unable to figure out why highlight is not working
as rust is supported by https://highlightjs.org/
Code:
code={context.snippet}
withCopyButton={false}
language={"rust"}
/>
11 messages · Page 1 of 1 (latest)
I am unable to figure out why highlight is not working
as rust is supported by https://highlightjs.org/
Code:
code={context.snippet}
withCopyButton={false}
language={"rust"}
/>
Works fine on codesandbox – https://codesandbox.io/s/cool-jang-czm9xz?file=/src/App.tsx
🦀
Forget this part
import "@mantine/code-highlight/styles.css";
Thanks @minor hemlock
fixed
@minor hemlock https://v6.mantine.dev/others/prism/#lines-highlight
is this possible in current version ?
No, lines highlight feature is not supported by @mantine/code-highlight package
is there any work around so I can use v6 prism in v7?
Probably possible with highlightjs extensions but I haven't tried it.
need few feature for v6 prism...
Like code highlight, wrap lines, line number
btw why expandable-code only supported in CodeHighlightTabs
https://mantine.dev/others/code-highlight/#expandable-code
CodeHighlight is more like internal component for Mantine documentation, it wasn't really built to be extensible and somewhat light. If you need more features, it's probably better to use a separate library that is designed to work with code, for example shiki has better code highlight algorithms, there are also other tools that are based on vscode syntax