mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-12-12 15:34:12 +01:00
chore: fix regexp
This commit is contained in:
@@ -274,7 +274,7 @@ export const drawClass = function (elem, classDef, conf) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const parseMember = function (text) {
|
export const parseMember = function (text) {
|
||||||
const fieldRegEx = /^(\+|-|~|#)?(\w+)(~\w+~|\[\])?\s+(\w+) *(\$)?$/;
|
const fieldRegEx = /^(\+|-|~|#)?(\w+)(~\w+~|\[\])?\s+(\w+) *(\*|\$)?$/;
|
||||||
const methodRegEx = /^([+|\-|~|#])?(\w+) *\( *(.*)\) *(\*|\$)? *(\w*[~|[\]]*\s*\w*~?)$/;
|
const methodRegEx = /^([+|\-|~|#])?(\w+) *\( *(.*)\) *(\*|\$)? *(\w*[~|[\]]*\s*\w*~?)$/;
|
||||||
|
|
||||||
let fieldMatch = text.match(fieldRegEx);
|
let fieldMatch = text.match(fieldRegEx);
|
||||||
|
|||||||
Reference in New Issue
Block a user