Use theme properly and another syntax highlight change
This commit is contained in:
parent
d2b7a3ec28
commit
ab3e076c91
|
@ -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
|
||||
```
|
||||
<first-entity> [<relationship> <second-entity> : <relationship-label>]
|
||||
```
|
||||
|
||||
|
@ -88,7 +88,7 @@ Where:
|
|||
|
||||
For example:
|
||||
|
||||
```markdown
|
||||
```
|
||||
PROPERTY ||--|{ ROOM : contains
|
||||
```
|
||||
|
||||
|
|
|
@ -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)
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue