Skip to content

Commit

Permalink
Close #4528 Use double bracket to render \ll(rr)bracket in MathJaX
Browse files Browse the repository at this point in the history
  • Loading branch information
James-Yu committed Feb 13, 2025
1 parent 27be475 commit 3dc5dc6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/preview/hover/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ export function mathjaxify(tex: string, envname: string, opt = { stripLabel: tru
if (envname.match(/^(aligned|alignedat|array|Bmatrix|bmatrix|cases|CD|gathered|matrix|pmatrix|smallmatrix|split|subarray|Vmatrix|vmatrix)$/)) {
s = '\\begin{equation}' + s + '\\end{equation}'
}
// #4528
s = s.replace(/\\llbracket(?!\w)/g, '\\left[\\!\\left[')
.replace(/\\rrbracket(?!\w)/g, '\\right]\\!\\right]')
return s
}

Expand Down

0 comments on commit 3dc5dc6

Please sign in to comment.