mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-16 22:09:57 +02:00
#1078 Lint fixes
This commit is contained in:
@@ -585,23 +585,22 @@ const render = function(id, txt, cb, container) {
|
|||||||
.selectAll('foreignobject > *')
|
.selectAll('foreignobject > *')
|
||||||
.attr('xmlns', 'http://www.w3.org/1999/xhtml');
|
.attr('xmlns', 'http://www.w3.org/1999/xhtml');
|
||||||
|
|
||||||
let url = '';
|
// if (config.arrowMarkerAbsolute) {
|
||||||
if (config.arrowMarkerAbsolute) {
|
// url =
|
||||||
url =
|
// window.location.protocol +
|
||||||
window.location.protocol +
|
// '//' +
|
||||||
'//' +
|
// window.location.host +
|
||||||
window.location.host +
|
// window.location.pathname +
|
||||||
window.location.pathname +
|
// window.location.search;
|
||||||
window.location.search;
|
// url = url.replace(/\(/g, '\\(');
|
||||||
url = url.replace(/\(/g, '\\(');
|
// url = url.replace(/\)/g, '\\)');
|
||||||
url = url.replace(/\)/g, '\\)');
|
// }
|
||||||
}
|
|
||||||
|
|
||||||
// Fix for when the base tag is used
|
// Fix for when the base tag is used
|
||||||
let svgCode = d3.select('#d' + id).node().innerHTML;
|
let svgCode = d3.select('#d' + id).node().innerHTML;
|
||||||
|
|
||||||
if (!config.arrowMarkerAbsolute || config.arrowMarkerAbsolute === 'false') {
|
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);
|
svgCode = decodeEntities(svgCode);
|
||||||
|
Reference in New Issue
Block a user