Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
45bbf84f
Commit
45bbf84f
authored
Oct 25, 2021
by
Felipe Murakami
Committed by
Kushal Pandya
Oct 25, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Switch to v-safe-html in latex
parent
ac898833
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
app/assets/javascripts/notebook/cells/output/latex.vue
app/assets/javascripts/notebook/cells/output/latex.vue
+9
-2
No files found.
app/assets/javascripts/notebook/cells/output/latex.vue
View file @
45bbf84f
<
script
>
import
{
GlSafeHtmlDirective
as
SafeHtml
}
from
'
@gitlab/ui
'
;
import
'
mathjax/es5/tex-svg
'
;
import
Prompt
from
'
../prompt.vue
'
;
...
...
@@ -7,6 +8,9 @@ export default {
components
:
{
Prompt
,
},
directives
:
{
SafeHtml
,
},
props
:
{
count
:
{
type
:
Number
,
...
...
@@ -33,13 +37,16 @@ export default {
return
svg
.
outerHTML
;
},
},
safeHtmlConfig
:
{
// to support SVGs and custom tags for mathjax
ADD_TAGS
:
[
'
use
'
,
'
mjx-container
'
,
'
mjx-tool
'
,
'
mjx-status
'
,
'
mjx-tip
'
],
},
};
</
script
>
<
template
>
<div
class=
"output"
>
<prompt
type=
"Out"
:count=
"count"
:show-output=
"index === 0"
/>
<!-- eslint-disable -->
<div
ref=
"maths"
v-html=
"code"
></div>
<div
ref=
"maths"
v-safe-html:
[$
options.safeHtmlConfig]=
"code"
></div>
</div>
</
template
>
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