Open nicole-ptr opened 2 years ago
Emmm, a complicated issue.
I have an indirect solution.
First you need to clone the origin markdown template to prevent the modified code from being covered.
Then search the following code.
function renderMath(ID) {
let text = document.getElementById(ID).innerHTML;
text = replaceInString(text);
document.getElementById(ID).textContent = text;
renderMathInElement(document.getElementById(ID), {
delimiters: [
{left: "$$", right: "$$", display: true},
{left: "$", right: "$", display: false}
],
throwOnError : false
});
}
Modify delimiters in both side.
Maybe \(
and \)
like {left: "\\(", right: "\\)", display: false}
.
Or [katex]
like {left: "[katex]", right: "[katex]", display: false}
Thanks pilgrimlyieu, this is exactly how to fix it, I know about this issue but fixing it would require to write a parser which understands whether you want $ to trigger the math mode or just a simple $. Since I don't have the time to maintain this addon I've thought about updating it s.t. changes in the original card types are not overwritten anymore, what do you think about this? This would mean that I will not be able to update the add on easily but it would be alot easier for you to change the card code
The below in JavaScript causes issues at it triggers katex:
also ${here}