asciidoctor-vscode
asciidoctor-vscode copied to clipboard
stem does not work with CSP enabled
The below asciiDoc content does not render at all: It's as if the MathJax extension is not active and the settings do not reference it.
:stem: latexmath
[stem] ++++ \begin{equation} C = \alpha \end{equation} ++++
and
[stem] ++++ \label{eq:ref} C = \alpha ++++
and even
.Equation One [stem] ++++ C = \alpha ++++
hi @EganSolo thanks for reporting.
As far as I can tell it works but it's not terribly well documented or obvious. You need to adjust the preview security settings either by clicking "Some content has been disabled in this document"


or going to the command window "Asciidoc: Change Preview Security Settings". If you set it to "Disable" it will allow the Mathjax scripts to load.
(However I think it should work if set to Strict so I think the content security policy is not functioning correctly, @joaompinto WDYT? I see this in the Webview window:
)
Hi @danyill You're right on the money. I disabled the security setting and had to reload the page a few time and it came through, showing me the right content. That's helpful. I'll keep an eye here to see if we can reinstate some level of security.
Thanks though, this is very helpful!
This information helps. Thank you. I think it shall be documented in the readme.
I'm confused. I had to disable security to get equations to work (worrying, I like security). But the readme says security needs to be disabled only for mathjax web, not for desktop. Is this an error? From 2020?
It won't be necessary to disable the security on the next version.
This issue still persists as of 2023-06-08.
chenchongpal wrote:
您的邮件已收到,谢谢。
DeepL: Your email has been received, thank you.
Sorry?
Edit: Seems to be some kind of automated E-Mail response, wich has been removed previously, huh.
This issue still persists as of 2023-06-08.
Are you using the pre-release version ?