Replies: 2 comments 5 replies
-
Remove the spaces around the |
Beta Was this translation helpful? Give feedback.
1 reply
-
I understand the comment. But I'm hesitant to make the change you suggest. It's good for the syntax of attributes to be fairly tightly controlled, so that people don't accidentally trigger attributes. In addition, it's possible that in the future we might make "bare words" significant (e.g. as flags or as something else, there's an issue for this somewhere). In principle, that might be compatible with allowing spaces around |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Minimal reproducible example for context. Spaces around the attribute key-value pair definition cause Pandoc to give up on parsing the div.
In contrast,
Why I think this matters. Last week we (I work for Posit on Quarto) hosted a teaching event for Quarto dashboards. The fenced div syntax is important for us, and so we ask learners to write documents with it. Approximately 80 people attended in person (so I could see what they were typing). About 10 people made the mistake shown above, typing
key = value
instead of the expectedkey=value
.Because there's no syntax errors in Pandoc, this was an instant blocker for a surprisingly large fraction of the attendees. That leads to my title: could this be improved?
I'm willing to try and write a PR to improve this, but it interacts with how Pandoc's markdown is defined to begin with (and so I imagine it's a delicate part of the code base). So, before I got started: would changing the parser to tolerate spaces around key-value definitions be an acceptable PR?
Thank you, as always!
Beta Was this translation helpful? Give feedback.
All reactions