Commit 3ea41f64 authored by Dheeraj Joshi's avatar Dheeraj Joshi

Address review suggestions

parent 9b3d97f0
...@@ -31,6 +31,7 @@ const MAX_CHAR_LIMIT = 2000; ...@@ -31,6 +31,7 @@ const MAX_CHAR_LIMIT = 2000;
const MAX_MERMAID_BLOCK_LIMIT = 50; const MAX_MERMAID_BLOCK_LIMIT = 50;
// Max # of `&` allowed in Chaining of links syntax // Max # of `&` allowed in Chaining of links syntax
const MAX_CHAINING_OF_LINKS_LIMIT = 30; const MAX_CHAINING_OF_LINKS_LIMIT = 30;
const BUFFER_IFRAME_HEIGHT = 10;
// Keep a map of mermaid blocks we've already rendered. // Keep a map of mermaid blocks we've already rendered.
const elsProcessingMap = new WeakMap(); const elsProcessingMap = new WeakMap();
let renderedMermaidBlocks = 0; let renderedMermaidBlocks = 0;
...@@ -119,7 +120,7 @@ function renderMermaidEl(el, source) { ...@@ -119,7 +120,7 @@ function renderMermaidEl(el, source) {
} }
const { h } = event.data; const { h } = event.data;
iframeEl.width = '100%'; iframeEl.width = '100%';
iframeEl.height = `${h + 10}px`; iframeEl.height = `${h + BUFFER_IFRAME_HEIGHT}px`;
}, },
false, false,
); );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment