-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
194 changed files
with
2,652 additions
and
3,184 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,58 @@ | ||
# A collection of updates that change the behaviour | ||
# A collection of updates that change the behavior | ||
|
||
## Async | ||
|
||
`parse`, `render` are now async. | ||
|
||
## Lazy loading and asynchronisity | ||
|
||
- Invalid dates are rendered as syntax error instead of returning best guess or the current date | ||
|
||
## ParseError is removed | ||
|
||
```js | ||
//< v10.0.0 | ||
mermaid.parse(text, parseError); | ||
|
||
//>= v10.0.0 | ||
await mermaid.parse(text).catch(parseError); | ||
// or | ||
try { | ||
await mermaid.parse(text); | ||
} catch (err) { | ||
parseError(err); | ||
} | ||
``` | ||
|
||
## Init deprecated and InitThrowsErrors removed | ||
|
||
The config passed to `init` was not being used eariler. | ||
It will now be used. | ||
The `init` function is deprecated and will be removed in the next major release. | ||
init currently works as a wrapper to `initialize` and `run`. | ||
|
||
```js | ||
//< v10.0.0 | ||
mermaid.init(config, selector, cb); | ||
|
||
//>= v10.0.0 | ||
mermaid.initialize(config); | ||
mermaid.run({ | ||
querySelector: selector, | ||
postRenderCallback: cb, | ||
suppressErrors: true, | ||
}); | ||
``` | ||
|
||
```js | ||
//< v10.0.0 | ||
mermaid.initThrowsErrors(config, selector, cb); | ||
|
||
//>= v10.0.0 | ||
mermaid.initialize(config); | ||
mermaid.run({ | ||
querySelector: selector, | ||
postRenderCallback: cb, | ||
suppressErrors: false, | ||
}); | ||
``` |
Oops, something went wrong.