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

Metadata parsers return consumed linecount #177

Merged
merged 2 commits into from
Dec 17, 2021
Merged

Metadata parsers return consumed linecount #177

merged 2 commits into from
Dec 17, 2021

Conversation

Oddsor
Copy link
Contributor

@Oddsor Oddsor commented Dec 16, 2021

When the metadata parsers return the number
of lines consumed, we can more easily figure
out the correct offset when parsing the rest
of the document.

This fixes an issue where the yaml metadata
parser did not handle empty lines and required
a trailing emptyline after the ending delimiter

When the metadata parsers return the number
of lines consumed, we can more easily figure
out the correct offset when parsing the rest
of the document.

This fixes an issue where the yaml metadata
parser did not handle empty lines and required
a trailing emptyline after the ending delimiter
@Oddsor
Copy link
Contributor Author

Oddsor commented Dec 16, 2021

This change "accidentally" also changes the behaviour of the wikimeta-parser so that this becomes valid (no empty line). Not sure if this is problematic or not 🤔

Title:   My Document
Summary: A brief description of my document.
Authors: Justin May
         Spooky Mulder
         End Line At End  
Date:    October 31, 2015
blank-value:
base_url: http://example.com
# The Document

@yogthos yogthos merged commit aa3df42 into yogthos:master Dec 17, 2021
@yogthos
Copy link
Owner

yogthos commented Dec 17, 2021

Thanks for the fix, I just pushed out 1.10.8 to Clojars with the updates.

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