Handle sequential code blocks with memory=True
mainBy default, check_md_file assumes each code block in a markdown file is independent. If your code blocks are sequential (e.g., the second block relies on variables defined in the first), you must set memory=True to maintain state between blocks.
import pathlib
from mktestdocs import check_md_file
fpath = pathlib.Path("docs") / "multiple-code-blocks.md"
# Use memory=True to allow blocks to depend on each other
check_md_file(fpath=fpath, memory=True)