Diagnostics
MDLeaf checks your document as you type. Problems appear as wavy underlines and gutter markers in the editor, and in the problems panel (macOS: ⇧⌘;, Windows and Linux: Ctrl+Shift+;). F8 and macOS: ⇧F8, Windows and Linux: Shift+F8 jump between them.
This table is generated from MDLeaf’s source code.
| Code | Severity | Fix |
|---|---|---|
directive-unknown | warning | Check the spelling. Known directives: pagebreak, toc, header, footer, hide, pagenumber. |
directive-misplaced | warning | Move the directive to the start of a top-level line: no indentation, not inside a list or quote. |
directive-attr-unknown | warning | Remove the attribute; see the directive’s attribute table. |
directive-attr-invalid | error | Fix the value (for example depth=1–6, start=whole number). |
image-attr-unknown | warning | Use only width, height and align. |
image-attr-invalid | error | Use a number with px, %, mm, cm, in or pt; align is left, center or right. |
placeholder-unknown | warning | Use {page} or {pages}; write {{ and }} for literal braces. |
html-disallowed | warning | Remove the tag; scripts, styles, frames and forms never reach the preview or PDF. |
asset-missing | error | Upload the image, fix the path, or pick an existing image with Insert image. |
asset-outside | error | Store images under assets/ (paste or upload them in MDLeaf). |
math-error | error | Fix the LaTeX; the KaTeX message tells you where. |
block-oversized | warning | Shorten the block or split it; images can be given a smaller height. |
Messages
Section titled “Messages”| Code | Message |
|---|---|
directive-unknown | Unknown directive ‘::name’. |
directive-misplaced | Directives only work at the start of a top-level line. |
directive-attr-unknown | ‘key’ is not an attribute of ::name. |
directive-attr-invalid | Invalid value for ‘key’ in ::name: reason. The directive is ignored. |
image-attr-unknown | Image attribute ‘key’ is not supported (use width, height, align). |
image-attr-invalid | Invalid image key ‘value’. |
placeholder-unknown | Unknown placeholder ‘{name}’ (use {page} or {pages}). |
html-disallowed | <tag> is removed from the preview and PDF. |
asset-missing | Image not found: path. |
asset-outside | Images must be stored under assets/ (found path). |
math-error | Math error: KaTeX message. |
block-oversized | This table is taller than one page and will be split across pages. |
block-oversized appears only in page view.
Document-level problems — a missing profile or theme, a URL theme that could not be refreshed, invalid overrides, or linked-folder issues — are listed at the top of the problems panel.