Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"yes" becomes "true" #10304

Open
champignoom opened this issue Oct 18, 2024 · 3 comments
Open

"yes" becomes "true" #10304

champignoom opened this issue Oct 18, 2024 · 3 comments
Labels

Comments

@champignoom
Copy link

yes in the input becomes true in the output. According to the latest YAML spec, "yes" is no longer a boolean, and reasonably so.

$ cat test.md                
---
indenting: [medium,yes]
...

$ pandoc -t context -s test.md | grep indenting
\setupindenting[medium,true]

$ pandoc -v
pandoc 3.5
Features: +server +lua
Scripting engine: Lua 5.4
User data directory: /home/exp/.local/share/pandoc
Copyright (C) 2006-2024 John MacFarlane. Web: https://pandoc.org
This is free software; see the source for copying conditions. There is no
warranty, not even for merchantability or fitness for a particular purpose.
@jgm
Copy link
Owner

jgm commented Oct 19, 2024

We use the Haskell yaml package for parsing YAML; this is based on libyaml which I think targets an older version of the YAML spec.

@jgm
Copy link
Owner

jgm commented Oct 19, 2024

HsYAML is an alternative we tried for a while, but it lacks an active maintainer and would not build reliably.

@tarleb
Copy link
Collaborator

tarleb commented Oct 30, 2024

Just to mention a work-around for this kind of issue: quoting the problematic value prevents it from being converted to a boolean. The following should all work:

indenting: [medium,'yes']
indenting:
  - medium
  - 'yes'
# and in this specific case:
indenting: 'medium,yes'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants