Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
open-webui
Commits
7b21b718
Commit
7b21b718
authored
Aug 14, 2024
by
Timothy J. Baek
Browse files
refac
parent
6e5b557a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
src/lib/utils/katex-extension.ts
src/lib/utils/katex-extension.ts
+4
-2
No files found.
src/lib/utils/katex-extension.ts
View file @
7b21b718
...
@@ -95,7 +95,6 @@ function inlineKatex(options, renderer) {
...
@@ -95,7 +95,6 @@ function inlineKatex(options, renderer) {
const
match
=
src
.
match
(
ruleReg
);
const
match
=
src
.
match
(
ruleReg
);
if
(
match
)
{
if
(
match
)
{
console
.
log
(
match
)
const
text
=
match
.
slice
(
2
).
filter
((
item
)
=>
item
).
find
((
item
)
=>
item
.
trim
());
const
text
=
match
.
slice
(
2
).
filter
((
item
)
=>
item
).
find
((
item
)
=>
item
.
trim
());
return
{
return
{
...
@@ -115,11 +114,14 @@ function blockKatex(options, renderer) {
...
@@ -115,11 +114,14 @@ function blockKatex(options, renderer) {
level
:
'
block
'
,
level
:
'
block
'
,
tokenizer
(
src
,
tokens
)
{
tokenizer
(
src
,
tokens
)
{
const
match
=
src
.
match
(
blockRule
);
const
match
=
src
.
match
(
blockRule
);
if
(
match
)
{
if
(
match
)
{
const
text
=
match
.
slice
(
2
).
filter
((
item
)
=>
item
).
find
((
item
)
=>
item
.
trim
());
return
{
return
{
type
:
'
blockKatex
'
,
type
:
'
blockKatex
'
,
raw
:
match
[
0
],
raw
:
match
[
0
],
text
:
match
[
0
]
,
text
:
text
,
};
};
}
}
},
},
...
...
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