mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-16 22:09:57 +02:00
First pass at a requirement diagram.
This commit is contained in:
@@ -147,9 +147,8 @@ export const detectDirective = function(text, type = null) {
|
||||
return result.length === 1 ? result[0] : result;
|
||||
} catch (error) {
|
||||
log.error(
|
||||
`ERROR: ${error.message} - Unable to parse directive${
|
||||
type !== null ? ' type:' + type : ''
|
||||
} based on the text:${text}`
|
||||
`ERROR: ${error.message} - Unable to parse directive
|
||||
${type !== null ? ' type:' + type : ''} based on the text:${text}`
|
||||
);
|
||||
return { type: null, args: null };
|
||||
}
|
||||
@@ -221,6 +220,10 @@ export const detectType = function(text) {
|
||||
return 'journey';
|
||||
}
|
||||
|
||||
if (text.match(/^\s*requirement/) || text.match(/^\s*requirementDiagram/)) {
|
||||
return 'requirement';
|
||||
}
|
||||
|
||||
return 'flowchart';
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user