Replies: 1 comment 1 reply
-
You need to tell Unpoly to run Highlight.js after rendering a new page fragment that requires custom JavaScript. This is normally done with an Unpoly compiler. I haven't tested this, but perhaps something like: up.compiler('pre > code', (e) => {
highlightElement(e)
}) I don't see anything from your example to indicate how highlight.js is selecting that specific |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm currently exploring Unpoly in a CRUD project managing issues akin to GitHub's. I'm using Django as the backend and highlight.js for syntax highlighting code snippets, just to give you context. I completed the project without using Unpoly, and everything worked fine up to that point. However, when I tried to add Unpoly for page navigation without page reload using the
up-target
attribute ina
HTML tags, navigation works smoothly without page reload, but I lose syntax highlighting for my code snippets. I'm unsure what's causing this issue. Could you please assist me?Observed Behavior:
Expected Behavior:
Thank you in advance.
Beta Was this translation helpful? Give feedback.
All reactions