Add the auto-generated header after any YAML front-matter blocks.
YAML front-matter is normally only valid in Markdown when it's at the
beginning of the Markdown file. GitHub/Vitepress may otherwise render
it incorrectly.
Change the `transformBlocks` function, which transforms a markdown str,
and instead making it into a
`transformMarkdownAst` function, which transforms a Markdown AST.
This means we can use the remark/unifiedjs plugin infrastructure, see
https://unifiedjs.com/learn/guide/create-a-plugin/
Vitepress uses YAML frontmatter to configure Vitepress specific
settings, see https://vitepress.vuejs.org/config/frontmatter-configs
We just need to use `remark-frontmatter` to add support for it.
GitHub also renders the YAML front-matter nicely in a table
automatically, but maybe we should instead strip it, if it's only
used by Vitepress?
* sidv/properlyWaitTests:
feat: Wait for rendering to finish before taking image snapshots
Update docs
chore(deps): update all non-major dependencies
Fix: Too many `primaryBorderColor`
vitest is throwing an error, since these types are used in
packages/mermaid/src/utils.ts, but are not being mocked.
I've added all the curve types I needed to make Vitest happy.
At some point, we may need to improve these mocks, since in d3,
they have the type CurveFactory, not string.
Fixes a semantic merge conflict due to the PRs:
- https://github.com/mermaid-js/mermaid/pull/3954
Changed `docs.mts` to use a remark object created by `remark()`
- https://github.com/mermaid-js/mermaid/pull/3946
Added test code that mocked the frozen remark object
(e.g. `remark` not `remark()`).
To fix this issue, we can mock `remark()` so that it always returns
the same remark object, which can then be used the `docs.mts` script,
as well as spied on in the `docs.spec.ts` test file.
Reported-by: Sidharth Vinod <sidharthv96@gmail.com>
Included an example for adding a line break to notes. It seems like an issue irking a lot of (new) users
Co-authored-by: Alois Klink <alois@aloisklink.com>
Co-authored-by: Chidozie Nnachor <Chidozie.Nnachor@keylane.com>