mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-09 10:36:43 +02:00
fix: exclude text with line breaks when parsing wrap setting
This commit is contained in:
@@ -1,6 +1,5 @@
|
|||||||
import mermaidAPI from '../../mermaidAPI';
|
import mermaidAPI from '../../mermaidAPI';
|
||||||
import * as configApi from '../../config';
|
import * as configApi from '../../config';
|
||||||
import common from '../common/common';
|
|
||||||
import { logger } from '../../logger';
|
import { logger } from '../../logger';
|
||||||
|
|
||||||
let prevActor = undefined;
|
let prevActor = undefined;
|
||||||
@@ -138,9 +137,7 @@ export const parseMessage = function(str) {
|
|||||||
const message = {
|
const message = {
|
||||||
text: _str.replace(/^[:]?(?:no)?wrap:/, '').trim(),
|
text: _str.replace(/^[:]?(?:no)?wrap:/, '').trim(),
|
||||||
wrap:
|
wrap:
|
||||||
_str.match(/^[:]?(?:no)?wrap:/) === null
|
_str.match(/^[:]?wrap:/) !== null
|
||||||
? common.hasBreaks(_str) || undefined
|
|
||||||
: _str.match(/^[:]?wrap:/) !== null
|
|
||||||
? true
|
? true
|
||||||
: _str.match(/^[:]?nowrap:/) !== null
|
: _str.match(/^[:]?nowrap:/) !== null
|
||||||
? false
|
? false
|
||||||
|
Reference in New Issue
Block a user