Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
canifa_note
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Vũ Hoàng Anh
canifa_note
Commits
874a4a71
Unverified
Commit
874a4a71
authored
Jan 06, 2026
by
Faizaan pochi
Committed by
GitHub
Jan 06, 2026
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: KaTeX math rendering with underscores (#5438)
parent
62646853
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
8 deletions
+13
-8
package.json
web/package.json
+2
-1
pnpm-lock.yaml
web/pnpm-lock.yaml
+9
-6
index.tsx
web/src/components/MemoContent/index.tsx
+1
-1
main.tsx
web/src/main.tsx
+1
-0
No files found.
web/package.json
View file @
874a4a71
...
...
@@ -36,6 +36,7 @@
"fuse.js"
:
"^7.1.0"
,
"highlight.js"
:
"^11.11.1"
,
"i18next"
:
"^25.6.3"
,
"katex"
:
"^0.16.27"
,
"leaflet"
:
"^1.9.4"
,
"leaflet.markercluster"
:
"^1.5.3"
,
"lodash-es"
:
"^4.17.21"
,
...
...
web/pnpm-lock.yaml
View file @
874a4a71
...
...
@@ -86,6 +86,9 @@ importers:
i18next
:
specifier
:
^25.6.3
version
:
25.6.3(typescript@5.9.3)
katex
:
specifier
:
^0.16.27
version
:
0.16.27
leaflet
:
specifier
:
^1.9.4
version
:
1.9.4
...
...
@@ -2111,8 +2114,8 @@ packages:
resolution
:
{
integrity
:
sha512-4+5mNNf4vZDSwPhKprKwz3330iisPrb08JyMgbsdFrimBCKNHecua/WBwvVg3n7vwx0C1ARjfhwIpbrbd9n5wg==
}
engines
:
{
node
:
'
>=12'
}
katex@0.16.2
5
:
resolution
:
{
integrity
:
sha512-
woHRUZ/iF23GBP1dkDQMh1QBad9dmr8/PAwNA54VrSOVYgI12MAcE14TqnDdQOdzyEonGzMepYnqBMYdsoAr8Q
==
}
katex@0.16.2
7
:
resolution
:
{
integrity
:
sha512-
aeQoDkuRWSqQN6nSvVCEFvfXdqo1OQiCmmW1kc9xSdjutPv7BGO7pqY9sQRJpMOGrEdfDgF2TfRXe5eUAD2Waw
==
}
hasBin
:
true
khroma@2.1.0
:
...
...
@@ -4832,7 +4835,7 @@ snapshots:
dependencies
:
lodash-es
:
4.17.21
katex@0.16.2
5
:
katex@0.16.2
7
:
dependencies
:
commander
:
8.3.0
...
...
@@ -5127,7 +5130,7 @@ snapshots:
dagre-d3-es
:
7.0.13
dayjs
:
1.11.19
dompurify
:
3.3.0
katex
:
0.16.2
5
katex
:
0.16.2
7
khroma
:
2.1.0
lodash-es
:
4.17.21
marked
:
16.4.2
...
...
@@ -5219,7 +5222,7 @@ snapshots:
dependencies
:
'
@types/katex'
:
0.16.7
devlop
:
1.1.0
katex
:
0.16.2
5
katex
:
0.16.2
7
micromark-factory-space
:
2.0.1
micromark-util-character
:
2.1.1
micromark-util-symbol
:
2.0.1
...
...
@@ -5594,7 +5597,7 @@ snapshots:
'
@types/katex'
:
0.16.7
hast-util-from-html-isomorphic
:
2.0.0
hast-util-to-text
:
4.0.2
katex
:
0.16.2
5
katex
:
0.16.2
7
unist-util-visit-parents
:
6.0.2
vfile
:
6.0.3
...
...
web/src/components/MemoContent/index.tsx
View file @
874a4a71
...
...
@@ -44,7 +44,7 @@ const MemoContent = (props: MemoContentProps) => {
onDoubleClick=
{
onDoubleClick
}
>
<
ReactMarkdown
remarkPlugins=
{
[
remarkDisableSetext
,
remark
Gfm
,
remarkBreaks
,
remarkMath
,
remarkTag
,
remarkPreserveType
]
}
remarkPlugins=
{
[
remarkDisableSetext
,
remark
Math
,
remarkGfm
,
remarkBreaks
,
remarkTag
,
remarkPreserveType
]
}
rehypePlugins=
{
[
rehypeRaw
,
rehypeKatex
,
[
rehypeSanitize
,
SANITIZE_SCHEMA
]]
}
components=
{
{
// Child components consume from MemoViewContext directly
...
...
web/src/main.tsx
View file @
874a4a71
...
...
@@ -17,6 +17,7 @@ import router from "./router";
import
{
applyLocaleEarly
}
from
"./utils/i18n"
;
import
{
applyThemeEarly
}
from
"./utils/theme"
;
import
"leaflet/dist/leaflet.css"
;
import
"katex/dist/katex.min.css"
;
// Apply theme and locale early to prevent flash
applyThemeEarly
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment