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

Improve Pandoc version incompatibility error messages #19

Merged
merged 1 commit into from
Jan 11, 2024

Conversation

max-heller
Copy link
Contributor

pandoc-ast/src/lib.rs

Lines 36 to 50 in e99d773

// test pandoc version
if let Some((major, minor)) = pandoc_version(obj) {
if !(major == 1 && minor >= 20) {
panic!(
"Pandoc version mismatch: \
`pandoc-ast` expects pandoc version 1.20 or newer, got {}.{}",
major, minor
);
}
} else {
panic!(
"Unable to parse pandoc version from JSON. \
Please update your pandoc to at least version 1.18 or use an older version of `pandoc-ast`"
);
}

The first message says that 1.20 is required, while the second says 1.18. I'm assuming 1.20 is intended since that's what the code checks.

Also, the version this is checking is Pandoc's AST version (the version of the pandoc-types package), which is versioned separately from pandoc. This clarifies that and states the corresponding minimum Pandoc version (2.8 assuming the 1.20 AST version requirement is the correct one).

@oli-obk oli-obk merged commit e756312 into oli-obk:main Jan 11, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants