mirror of
https://github.com/alrayyes/wiki.git
synced 2025-06-20 20:16:33 +00:00
feat: latex in search results
This commit is contained in:
parent
4cd6f7efdf
commit
ce5df837f5
3 changed files with 14 additions and 4 deletions
assets/js
|
@ -203,6 +203,16 @@ const displayResults = (term, finalResults, extractHighlight = false) => {
|
|||
}
|
||||
)
|
||||
.join("\n")
|
||||
if (LATEX_ENABLED) {
|
||||
renderMathInElement(results, {
|
||||
delimiters: [
|
||||
{ left: '$$', right: '$$', display: false },
|
||||
{ left: '$', right: '$', display: false },
|
||||
],
|
||||
throwOnError: false
|
||||
})
|
||||
}
|
||||
|
||||
const anchors = [...document.getElementsByClassName("result-card")]
|
||||
anchors.forEach((anchor) => {
|
||||
anchor.onclick = () => redir(anchor.id, term)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue