Skip to content

meta: quoted frontmatter scalars containing ": " are silently dropped #120

Description

@drawmeanelephant

Summary

oliver meta silently drops any frontmatter key whose value is a quoted scalar containing ": " (colon followed by a space). The key simply never appears in the JSON output — no warning, no error. Downstream templates then render an empty $title$ / $description$ with no signal that anything went wrong.

Found from Rotkeeper (rendering pipeline pins commit 06dd6403c505b4863a54c548c978e494b55eb759): every scaffolder-generated showcase page titled "Showcase: <name>" rendered an empty <title> and header.

Reproduction

$ printf -- '---\ntitle: "No Colon Here"\ndescription: "d"\n---\n\nx\n' > t1.md
$ printf -- '---\ntitle: "Has: Colon"\ndescription: "d"\n---\n\nx\n' > t2.md
$ oliver meta --from markdown --format json < t1.md | jq -r .title
No Colon Here
$ oliver meta --from markdown --format json < t2.md | jq -r .title
        # <- empty; key absent from the JSON entirely

Characterization

Input Result
title: "Has: Colon" key dropped
description: "Desc: here" and author: "A: B" (same doc) all three keys dropped — not title-specific, every quoted scalar with ": " is affected
title: 'Single: Colon' (single quotes) key dropped
title: "NoSpace:Colon" parsed correctly
title: "Trailing: " (colon+space at end of scalar) key dropped
title: Unquoted: Colon Value key dropped — arguably expected, that's ambiguous YAML

So the trigger is specifically the ": " sequence inside a quoted scalar.

Expected behavior

Quoted YAML scalars may legally contain ": "; the parser should keep the key and expose the full string in meta output. At minimum it should emit a loud warning rather than silently omitting the field — silent empty titles are painful to debug downstream (we only caught it because a cross-template rendering audit diffed <title> contents).

Environment

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions