diff --git a/src/diagram-api/detectType.ts b/src/diagram-api/detectType.ts index 34c78404a..87b681767 100644 --- a/src/diagram-api/detectType.ts +++ b/src/diagram-api/detectType.ts @@ -13,7 +13,7 @@ const diagramMatchers: Record = { 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) => { diff --git a/src/styles.ts b/src/styles.ts index 1b4105b99..29ebb4fe4 100644 --- a/src/styles.ts +++ b/src/styles.ts @@ -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,