mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-19 07:19:41 +02:00
Use theme properly and another syntax highlight change
This commit is contained in:
@@ -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)
|
||||
})
|
||||
|
Reference in New Issue
Block a user