Render inline math in on-hover docs (#1635)

This commit is contained in:
Jonatan Kłosko 2023-01-10 20:30:04 +01:00 committed by GitHub
parent ee1fea2993
commit d8efd348e9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -402,7 +402,13 @@ class LiveEditor {
// We mutate the DOM, so we use a flag to ignore events
// that we triggered ourselves
if (!this.hoverContentProcessed) {
renderMathInElement(this.hoverContentEl);
renderMathInElement(this.hoverContentEl, {
delimiters: [
{ left: "$$", right: "$$", display: true },
{ left: "$", right: "$", display: false },
],
throwOnError: false,
});
this.hoverContentProcessed = true;
}
}).observe(this.hoverContentEl, { childList: true });