mdsmith
Esc
    v0.52.0 GitHub
    MDS034 structural ready

    MDS034: markdown-flavor

    Flags Markdown syntax that the declared target flavor does not render.

    MDS034 is the flavor gate: it answers “will the target renderer interpret this syntax as the named feature?” Style choices among equally-valid forms (emphasis style, list marker, horizontal rule) live in separate rules. Project-level bundles that pair a flavor with style rules live in conventions . For the conceptual line between flavor, rule, convention, and kind see the concepts doc .

    # Settings

    KeyTypeDescription
    flavorstringTarget flavor; see table below.

    The flavor name is case-sensitive. Supported values:

    • commonmark — strict CommonMark; rejects every tracked feature.
    • gfm — GitHub Flavored Markdown; adds tables, task lists, strikethrough, and bare-URL autolinks.
    • goldmark — mdsmith-defined flavor variant; GFM plus heading IDs.
    • pandoc — Pandoc’s default markdown; GFM plus footnotes, definition lists, heading IDs, superscript, subscript, math block, and inline math. Rejects abbreviations (non-default extension).
    • phpextra — PHP Markdown Extra; tables, footnotes, definition lists, heading IDs, and abbreviations. Rejects GFM features and math.
    • multimarkdown — MultiMarkdown; PHP Extra plus math block and inline math.
    • myst — MyST (Sphinx documentation flavor); tables, strikethrough, footnotes, definition lists, heading IDs, math block, and inline math.
    • any — accepts every tracked feature. Use when the target renderer is unknown or permissive and you want to silence flavor diagnostics without disabling the rule.

    # Config

    Enable with a target flavor:

    rules:
      markdown-flavor:
        flavor: gfm

    Disable (default):

    rules:
      markdown-flavor: false

    # Detected features

    MDS034 tracks thirteen syntax features whose support varies across Markdown flavors.

    Eleven features are detected from the goldmark AST of a dual parse. That parse enables five built-in extensions: table, strikethrough, task list, footnote, and definition list. It also enables the heading-ID attribute parser. Five custom parsers add superscript, subscript, math block, inline math, and abbreviations.

    Bare-URL autolinks are detected separately. The detector scans text nodes from the main parse for URL-shaped text. It skips links, autolinks, code spans, and code blocks.

    GitHub Alerts are detected from the CommonMark AST. The detector matches the five GFM tokens (NOTE, TIP, IMPORTANT, WARNING, CAUTION) on the first line of a blockquote paragraph. Matching is case-sensitive per the GFM spec.

    flavor: any accepts every feature and is omitted from the table below.

    Featurecommonmarkgfmgoldmarkpandocphpextramultimarkdownmyst
    tablesnoyesyesyesyesyesyes
    task listsnoyesyesyesnonono
    strikethroughnoyesyesyesnonoyes
    bare-URL autolinksnoyesyesyesnonono
    footnotesnononoyesyesyesyes
    definition listsnononoyesyesyesyes
    heading IDsnonoyesyesyesyesyes
    superscriptnononoyesnonono
    subscriptnononoyesnonono
    math blocksnononoyesnoyesyes
    inline mathnononoyesnoyesyes
    abbreviationsnonononoyesyesno
    github alertsnoyesnonononono

    # Examples

    # Good

    # Heading
    
    Text with ~~old~~ markup and a task list:
    
    - [x] done
    - [ ] todo

    # Bad

    # Heading
    
    | a | b |
    | - | - |
    | 1 | 2 |

    # Meta-Information

    • ID: MDS034
    • Name: markdown-flavor
    • Status: ready
    • Default: disabled
    • Fixable: partially (GitHub Alerts only)
    • Implementation: source
    • Category: structural