From cbd27831dff31d3060b7101b8ce78383545b14c2 Mon Sep 17 00:00:00 2001 From: Knut Sveidqvist Date: Wed, 20 Nov 2019 19:14:32 +0100 Subject: [PATCH] #1078 Lint fixes --- src/mermaidAPI.js | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/src/mermaidAPI.js b/src/mermaidAPI.js index ea4ee8f88..0907d6df0 100644 --- a/src/mermaidAPI.js +++ b/src/mermaidAPI.js @@ -585,23 +585,22 @@ const render = function(id, txt, cb, container) { .selectAll('foreignobject > *') .attr('xmlns', 'http://www.w3.org/1999/xhtml'); - let url = ''; - if (config.arrowMarkerAbsolute) { - url = - window.location.protocol + - '//' + - window.location.host + - window.location.pathname + - window.location.search; - url = url.replace(/\(/g, '\\('); - url = url.replace(/\)/g, '\\)'); - } + // if (config.arrowMarkerAbsolute) { + // url = + // window.location.protocol + + // '//' + + // window.location.host + + // window.location.pathname + + // window.location.search; + // url = url.replace(/\(/g, '\\('); + // url = url.replace(/\)/g, '\\)'); + // } // Fix for when the base tag is used let svgCode = d3.select('#d' + id).node().innerHTML; if (!config.arrowMarkerAbsolute || config.arrowMarkerAbsolute === 'false') { - svgCode = svgCode.replace(/marker-end=\"url\(.*?#/g, 'marker-end="url(#', 'g'); + svgCode = svgCode.replace(/marker-end="url\(.*?#/g, 'marker-end="url(#', 'g'); } svgCode = decodeEntities(svgCode);