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
3ea41f64
Commit
3ea41f64
authored
Jan 12, 2022
by
Dheeraj Joshi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Address review suggestions
parent
9b3d97f0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
app/assets/javascripts/behaviors/markdown/render_sandboxed_mermaid.js
...avascripts/behaviors/markdown/render_sandboxed_mermaid.js
+2
-1
No files found.
app/assets/javascripts/behaviors/markdown/render_sandboxed_mermaid.js
View file @
3ea41f64
...
...
@@ -31,6 +31,7 @@ const MAX_CHAR_LIMIT = 2000;
const
MAX_MERMAID_BLOCK_LIMIT
=
50
;
// Max # of `&` allowed in Chaining of links syntax
const
MAX_CHAINING_OF_LINKS_LIMIT
=
30
;
const
BUFFER_IFRAME_HEIGHT
=
10
;
// Keep a map of mermaid blocks we've already rendered.
const
elsProcessingMap
=
new
WeakMap
();
let
renderedMermaidBlocks
=
0
;
...
...
@@ -119,7 +120,7 @@ function renderMermaidEl(el, source) {
}
const
{
h
}
=
event
.
data
;
iframeEl
.
width
=
'
100%
'
;
iframeEl
.
height
=
`
${
h
+
10
}
px`
;
iframeEl
.
height
=
`
${
h
+
BUFFER_IFRAME_HEIGHT
}
px`
;
},
false
,
);
...
...
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