Diagnostic reference#
Every problem MarkUP reports has a stable code. Tools can filter on codes; messages may improve between versions.
Severities are the defaults; a few diagnostics use a different severity in specific situations (for example, chart length mismatches are warnings).
Syntax#
| Code | Name | Severity | Meaning |
MU1001 | unclosed-directive | error | A container directive was never closed with a ::: fence. |
MU1002 | implicitly-closed-directive | error | A container directive was closed implicitly by the closing fence of an outer directive or by the end of its parent block. |
MU1003 | stray-closing-fence | error | A closing fence does not match any open container directive at this nesting level. |
MU1004 | short-closing-fence | error | A closing fence is shorter than the opening fence of the innermost open directive. |
MU1005 | directive-trailing-content | error | Unexpected text after a block directive’s name, label or attributes. |
MU1006 | directive-name-spacing | warning | Whitespace between the colons and a directive name (::: note). The directive is still recognised; write :::note. |
MU1007 | unterminated-label | error | A directive label [ is not closed on the same line. |
MU1008 | unterminated-attributes | error | An attribute block { is not closed. |
MU1009 | invalid-attribute | error | An attribute block contains something that is not an id, class or key/value pair. |
MU1010 | duplicate-attribute | warning | The same attribute key appears more than once; the last value wins. |
MU1011 | unclosed-code-fence | warning | A fenced code block runs to the end of its container without a closing fence. |
MU1012 | comment-problem | warning | A <!-- comment block is never closed with -->, or has text after --> that is hidden with it. |
MU1013 | missing-directive-name | error | A directive fence is not followed by a name. |
MU1014 | table-extra-cells | warning | A table row has more cells than the header; the extra cells are dropped. |
MU1015 | nesting-too-deep | error | Nesting exceeds the parser’s depth limit; deeper structure is flattened into text. |
MU1016 | unclosed-front-matter | warning | A front matter block opened with --- on the first line is never closed. |
MarkUP Data#
| Code | Name | Severity | Meaning |
MU1501 | data-syntax | error | MarkUP Data (front matter or a data body) is malformed. |
MU1502 | data-duplicate-key | error | A key appears twice in the same MarkUP Data mapping; the later entry is ignored. |
MU1503 | data-tab-indent | error | MarkUP Data indentation must use spaces, not tabs. |
MU1504 | data-unterminated-string | error | A quoted string in MarkUP Data is not closed on its line. |
Validation#
| Code | Name | Severity | Meaning |
MU2001 | unknown-directive | warning | No component with this name is registered. |
MU2002 | directive-form-not-allowed | error | The component cannot be used in this form (inline, leaf or container). |
MU2003 | unknown-attribute | warning | The component does not declare this attribute. |
MU2004 | invalid-attribute-value | error | An attribute value does not match the component’s schema. |
MU2005 | missing-attribute | error | A required attribute is missing. |
MU2006 | missing-label | error | The component requires a [label]. |
MU2007 | unexpected-label | warning | The component does not use a [label]; it is ignored. |
MU2008 | invalid-parent | error | The component is placed inside a parent that does not allow it. |
MU2009 | invalid-child | error | The component only accepts specific children. |
MU2010 | invalid-data | error | A data body or front matter value does not match its schema. |
MU2011 | missing-body | error | The component requires a body. |
MU2020 | duplicate-id | warning | Two elements share the same id. |
MU2021 | undefined-footnote | warning | A footnote reference has no matching definition. |
MU2022 | unused-footnote | hint | A footnote definition is never referenced. |
MU2023 | unsafe-url | warning | A link or image URL uses a scheme that renderers refuse to output. |
MU2024 | duplicate-definition | warning | A link reference or footnote label is defined more than once; the first definition wins. |
MU2025 | unresolved-anchor | warning | A #fragment link does not match any heading or id in the document. |
Internal#
| Code | Name | Severity | Meaning |
MU9001 | internal-error | error | The parser hit an internal error. Please report it. |