Skip to content

markdown-content-parity false positives on OpenAPI-style reference pages (schema-row serialization, typographic quotes) #106

Description

@dacharyc

Symptom

On Fern-hosted OpenAPI reference docs, markdown-content-parity reports 45–70% content "missing" from markdown on pages where manual inspection shows the markdown is complete. Observed at scale on docs.nvidia.com/nemo-platform: 13–18 of 50 sampled pages flagged (avg 15–18% missing), almost all OpenAPI endpoint pages. One page reported 100% missing (a tutorials landing page) whose markdown is also complete.

Example page: https://docs.nvidia.com/nemo-platform/documentation/reference/api-reference/virtual-models/create-virtual-model (reported 56% missing; markdown is complete).

Root cause (two comparison artifacts)

  1. Schema-row serialization. The HTML renders schema fields as adjacent inline elements that extract as run-together text: workspacestringRequired, default_model_entitystringOptional, autoprovisionedbooleanOptionalDefaults to false. The markdown carries the same information as structured list items: - \workspace` (string, required)`. Line/segment matching can never align these, so every schema row counts as missing.

  2. Typographic quote normalization. The HTML uses curly quotes (“workspace/name”) where the markdown has straight quotes ("workspace/name"), which breaks matching for otherwise-identical prose lines.

Suggested fixes

  • Normalize typographic characters (curly quotes, en/em dashes, ellipsis, NBSP) on both sides before comparison.
  • For lines that fail exact matching, fall back to token-level containment (a line whose word tokens all appear in the markdown, in order or as a set, is not missing) — this absorbs the run-together schema-row rendering without loosening detection of genuinely absent prose.
  • Consider treating breadcrumb/toolbar strings (Ask a question|Copy page|View as Markdown) as chrome even when they appear inside <article>.

Impact

Fern is a major docs platform (and afdocs powers Fern's Agent Score), so this false positive dings a whole class of well-behaved sites — the parity check was the largest deduction on an otherwise 95+ property.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions