mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-08-15 22:39:26 +02:00
fix: trim the direction string in flowchart
This commit is contained in:
5
.changeset/smart-humans-cover.md
Normal file
5
.changeset/smart-humans-cover.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'mermaid': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
fix: Update flowchart direction TD's behavior to be the same as TB
|
@@ -403,7 +403,8 @@ You have to call mermaid.initialize.`
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public setDirection(dir: string) {
|
public setDirection(dir: string) {
|
||||||
this.direction = dir;
|
this.direction = dir.trim();
|
||||||
|
|
||||||
if (/.*</.exec(this.direction)) {
|
if (/.*</.exec(this.direction)) {
|
||||||
this.direction = 'RL';
|
this.direction = 'RL';
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user