mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-15 21:39:40 +02:00
#1955 Fix for non htmlLabels
This commit is contained in:
@@ -298,13 +298,13 @@ const render = function(id, _txt, cb, container) {
|
||||
if (graphType === 'flowchart' || graphType === 'flowchart-v2' || graphType === 'graph') {
|
||||
const classes = flowRenderer.getClasses(txt);
|
||||
for (const className in classes) {
|
||||
userStyles += `\n.${className} > * { ${classes[className].styles.join(
|
||||
' !important; '
|
||||
)} !important; }`;
|
||||
if (cnf.htmlLabels) {
|
||||
userStyles += `\n.${className} span { ${classes[className].styles.join(
|
||||
' !important; '
|
||||
)} !important; }`;
|
||||
userStyles += `\n.${className} tspan { ${classes[className].styles.join(
|
||||
} else {
|
||||
console.log('classes[className].styles', classes[className].styles, cnf.htmlLabels);
|
||||
userStyles += `\n.${className} rect { ${classes[className].styles.join(
|
||||
' !important; '
|
||||
)} !important; }`;
|
||||
if (classes[className].textStyles) {
|
||||
@@ -314,6 +314,7 @@ const render = function(id, _txt, cb, container) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// log.warn(cnf.themeVariables);
|
||||
|
||||
|
Reference in New Issue
Block a user