mirror of
https://github.com/livebook-dev/livebook.git
synced 2025-12-19 06:30:13 +08:00
Render inline math in on-hover docs (#1635)
This commit is contained in:
parent
ee1fea2993
commit
d8efd348e9
1 changed files with 7 additions and 1 deletions
|
|
@ -402,7 +402,13 @@ class LiveEditor {
|
||||||
// We mutate the DOM, so we use a flag to ignore events
|
// We mutate the DOM, so we use a flag to ignore events
|
||||||
// that we triggered ourselves
|
// that we triggered ourselves
|
||||||
if (!this.hoverContentProcessed) {
|
if (!this.hoverContentProcessed) {
|
||||||
renderMathInElement(this.hoverContentEl);
|
renderMathInElement(this.hoverContentEl, {
|
||||||
|
delimiters: [
|
||||||
|
{ left: "$$", right: "$$", display: true },
|
||||||
|
{ left: "$", right: "$", display: false },
|
||||||
|
],
|
||||||
|
throwOnError: false,
|
||||||
|
});
|
||||||
this.hoverContentProcessed = true;
|
this.hoverContentProcessed = true;
|
||||||
}
|
}
|
||||||
}).observe(this.hoverContentEl, { childList: true });
|
}).observe(this.hoverContentEl, { childList: true });
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue