From ab3e076c910680a7c2f2d0cb250afd7608e238bb Mon Sep 17 00:00:00 2001 From: Yash-Singh1 Date: Mon, 1 Nov 2021 19:33:01 -0700 Subject: [PATCH] Use theme properly and another syntax highlight change --- docs/entityRelationshipDiagram.md | 4 ++-- docs/index.html | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/entityRelationshipDiagram.md b/docs/entityRelationshipDiagram.md index 53a5c0ab3..1b8206c16 100644 --- a/docs/entityRelationshipDiagram.md +++ b/docs/entityRelationshipDiagram.md @@ -75,7 +75,7 @@ When including attributes on ER diagrams, you must decide whether to include for Mermaid syntax for ER diagrams is compatible with PlantUML, with an extension to label the relationship. Each statement consists of the following parts: -```markdown +``` [ : ] ``` @@ -88,7 +88,7 @@ Where: For example: -```markdown +``` PROPERTY ||--|{ ROOM : contains ``` diff --git a/docs/index.html b/docs/index.html index 00fb06fa7..3589afaca 100644 --- a/docs/index.html +++ b/docs/index.html @@ -46,8 +46,9 @@ function colorizeEverything(html) { initEditor(monaco) return new Promise((resolve, reject) => { + monaco.editor.setTheme('mermaid') var parsed = parser.parseFromString(html, 'text/html').body - Promise.all([...parsed.querySelectorAll('pre[id*="code"]')].map(codeBlock => monaco.editor.colorize(codeBlock.innerText, 'mermaid', { theme: 'mermaid' }))).then(result => { + Promise.all([...parsed.querySelectorAll('pre[id*="code"]')].map(codeBlock => monaco.editor.colorize(codeBlock.innerText, 'mermaid'))).then(result => { parsed.querySelectorAll('pre[id*="code"]').forEach((codeBlock, index) => codeBlock.innerHTML = result[index]) resolve(parsed.innerHTML) })