Revert flowchart change

This commit is contained in:
Sidharth Vinod 2022-09-01 19:16:15 +05:30
parent 4619ff2ad0
commit 36be8114d0
No known key found for this signature in database
GPG Key ID: FB5CCD378D3907CD
2 changed files with 4 additions and 9 deletions

View File

@ -13,7 +13,7 @@ const diagramMatchers: Record<string, RegExp> = {
gantt: /^\s*gantt/,
classDiagram: /^\s*classDiagram-v2/,
stateDiagram: /^\s*stateDiagram-v2/,
'flowchart-v2': /^\s*flowchart/,
'flowchart-v2': /^\s*flowchart/, // Might need to add |graph to fix #3391
info: /^\s*info/,
pie: /^\s*pie/,
er: /^\s*erDiagram/,
@ -72,8 +72,9 @@ export const detectType = function (text: string, config?: MermaidConfig): strin
return key;
}
}
throw new Error(`No diagram type detected for text: ${text}`);
// TODO: #3391
// throw new Error(`No diagram type detected for text: ${text}`);
return 'flowchart';
};
export const addDetector = (key: string, detector: DiagramDetector) => {

View File

@ -33,12 +33,6 @@ const themes = {
c4,
};
// TODO: Delete as it's not used
// export const calcThemeVariables = (theme: string, userOverRides) => {
// log.info('userOverides', userOverRides);
// return theme.calcColors(userOverRides);
// };
const getStyles = (
type: string,
userStyles: string,