I’m trying to dynamically insert a variable into a Python code block inside a <ProsePre> component.
This is what I want to render (its working in .md file with nuxt-content but without real dynamic variable tho):
```python
import test as ts
ts.something("DYNAMIC_VARIABLE_HERE")
```
I tried the following:
<ProsePre language="python" lang="python" :code="`import test as ts\n ts.something('${DYNAMIC_VARIABLE_HERE}')`">
import test as ts <br/>
ts.something("DYNAMIC_VARIABLE_HERE")
</ProsePre>
The copy-to-clipboard function works, but syntax highlighting doesn’t work at all.
How am I supposed to do this correctly?
I also checked the Nuxt UI documentation, and even their own example component seems broken:
https://github.com/nuxt/ui/blob/9002f27d439f81c48e5882a3729eaeb1b66e1b18/docs/app/components/content/SupportedLanguages.vue#L76
It renders the code, but:
- there’s no
copyprop, so copying doesn't work - syntax highlighting should be
bash, but no highlighting appears
Is this a known issue, or am I using it incorrectly?
The Intuitive Vue UI Library powered by Reka UI & Tailwind CSS. - nuxt/ui