Check dependencies in Markdown code blocks.
This function finds all TOML code blocks in
path and looks for
pkg_name in those blocks. A code block fails the
check if it has a dependency on
pkg_name that doesn't match
pkg_version, or if it has no dependency on
pkg_name at all.
Consider a package named
foo with version 1.2.3. The following
TOML block will pass the test:
```toml [dependencies] foo = "1.2.3" ```
dev-dependencies are examined. If you
want to skip a block, add
no_sync to the language line:
```toml,no_sync [dependencies] foo = "1.2.3" ```
Code blocks also fail the check if they cannot be parsed as TOML.
If any block fails the check, an
Err is returned with a succinct
error message. Status information has then already been printed on