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

Fix pandoc metadata check #80

Merged
merged 2 commits into from
Apr 7, 2021

Conversation

tomidery
Copy link

@tomidery tomidery commented Apr 6, 2021

I noticed problems when one of the first 3 lines of the document was empty. Then the check for % character failed. Additionally the whole content of the file was split into lines and then merged. I think it is more efficient to just truncate the beginning of the file. As the s parameter is not var I couldn't use delete which would change the input so the substring of the input is created. I wasn't also sure why this was done, I assume that Discount was not able to handle it correctly if not all three lines started with %.

@h3rald
Copy link
Owner

h3rald commented Apr 7, 2021

Yes, discount didn't like empty metadata. Either they are all present or not. Anyhow yes, your fix makes sense!

@h3rald h3rald merged commit 7427de3 into h3rald:master Apr 7, 2021
@tomidery
Copy link
Author

tomidery commented Apr 7, 2021 via email

@tomidery tomidery deleted the fix-pandoc-metadata-check branch April 22, 2021 17:34
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