Skip to content

Bug: first line of a slide disappears when it is a single word followed by a colon #4

@dpecos

Description

@dpecos

Description

If the very first line of a slide looks like word: value (a single word followed by a colon and text), it is silently consumed as a slide property rather than rendered as content, even when the author did not intend it to be a property.

Steps to reproduce

---

Example: this line disappears

More content here.

The Example: this line disappears line does not appear on the slide.

Root cause

The property-extraction regex in src/mdeck/parser.ts matches any word: value pattern at the top of the slide source before stripping it from the content. There is no way to escape or opt out of this behaviour.

Expected behaviour

Either:

  • Provide an escape mechanism (e.g. \\Example: ...) so a line that resembles a property can be rendered as content.
  • Only treat the first block of consecutive key: value lines (separated from content by a blank line) as properties, consistent with YAML front matter conventions.

Ported from gnab/remark#688

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    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