Merge branch 'release/9.2.0' of https://github.com/mermaid-js/mermaid into release/9.2.0

* 'release/9.2.0' of https://github.com/mermaid-js/mermaid:
  #3252 Handling for trailing whitespaces in subgraph titles
This commit is contained in:
Sidharth Vinod 2022-10-11 16:17:00 +05:30
commit 50f44c5cb0
No known key found for this signature in database
GPG Key ID: FB5CCD378D3907CD

View File

@ -456,8 +456,8 @@ export const defaultStyle = function () {
export const addSubGraph = function (_id, list, _title) { export const addSubGraph = function (_id, list, _title) {
// console.log('addSubGraph', _id, list, _title); // console.log('addSubGraph', _id, list, _title);
let id = _id.trim(); let id = _id.trim();
let title = _title; let title = _title.trim();
if (_id === _title && _title.match(/\s/)) { if (id === title && title.match(/\s/)) {
id = undefined; id = undefined;
} }
/** @param a */ /** @param a */