8000 markdown writer on YAML block doesn't always add enough quotes · Issue #7245 · jgm/pandoc · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
markdown writer on YAML block doesn't always add enough quotes #7245
Closed
@rose00

Description

@rose00
$ echo $'---\ntitle: "*hello* world"\n---\n\ngreetings' | pandoc -s -tnative
Pandoc (Meta {unMeta = fromList [("title",MetaInlines [Emph [Str "hello"],Space,Str "world"])]})
[Para [Str "greetings"]]
$ # (ok, that was good)
$ echo $'---\ntitle: "*hello* world"\n---\n\ngreetings' | pandoc -s -tmarkdown
---
title: *hello* world
---

greetings
$ # Gandalf says: You shall not Parse.
$ echo $'---\ntitle: "*hello* world"\n---\n\ngreetings' | pandoc -s -tmarkdown | pandoc -s -tmarkdown
  ----------------------
  title: *hello* world
  ----------------------

greetings
$ # no YAML, but this table is your consolation prize

Notice that the title string begins with a punctuation character.
The string is quoted in the first input, but in the unparsed markdown it is unquoted.
An unquoted title with markup causes the markdown parser to fail to recognize the YAML block.

Probable fix: Have the YAML block unparsed add quotes more often.

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

      0