Skip to content

CDATA case-insensitivity question #611

@numist

Description

@numist

cmark's inline raw HTML and HTML block matchers accept the literal <![CDATA[ case-insensitively, treating <![cdata[, <![CDATa[, <![cDaTa[ etc. as valid CDATA opens. CommonMark 0.31.2 §6.6 specifies the exact string <![CDATA[ (case-sensitive), and that wording inherits the underlying XML 1.0 (Fifth Edition) production [19] CDStart ::= '<![CDATA[', which is case-sensitive (XML is case-sensitive throughout).

cmark's matcher has matched case-insensitively since the initial commit, but the commit history doesn't show any deliberation about CDATA specifically; is this leniency intended (in which case the spec needs amending) or incidental (in which case the matcher should tighten)?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions