I'm trying use Prism for code highlight, but it did not apply for "xml language".
I add prism css and js files to head html and body html as below
ui.add_head_html('<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.5.0/themes/prism.min.css"/>')
ui.add_body_html('<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.23.0/prism.min.js"></script>')
I tried python and css language and this way can work except xml language. I checked the page source and see that the tags "<", ">" did not replaced by < and >. Any help is appreciated
mark-up languages work a bit differently with prism. In order to get the angle brackets in the tags to render correctly you have to replace them with '<' and '>'. For example:
would have to be written as:
You can find more information on this problem on this issue on Prism's Github page, and if you run into similar problems, this is handy for working around them