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

Prevent tripping over comments #27

Merged
merged 1 commit into from
Mar 21, 2024

Conversation

oktaal
Copy link
Contributor

@oktaal oktaal commented Mar 20, 2024

Hi! I've encountered a small bug where a comment directly after the <FoLiA>-tag caused a parsing error.

@proycon proycon merged commit 4155117 into proycon:master Mar 21, 2024
1 of 5 checks passed
@proycon
Copy link
Owner

proycon commented Mar 21, 2024

Nice one, thanks, merged now!

@kosloot
Copy link
Collaborator

kosloot commented Mar 22, 2024

I think the provided test contains invalid, or al least questionable FoLiA.
folialint doesn't accept it:

XML error: Expecting element metadata, got 'text'

imho it is correct to reject?

@kosloot
Copy link
Collaborator

kosloot commented Mar 22, 2024

Additional note:
This example inspired me to extend the handling of XML comment in libfolia a bit.
The (fixed) example files will be handled by libfolia, preserving all comment.
NOT completely preserving the order though. (which libfolia never did)

@proycon
Copy link
Owner

proycon commented Mar 25, 2024

I think the provided test contains invalid, or al least questionable FoLiA. folialint doesn't accept it:

XML error: Expecting element metadata, got 'text'

Yeah, you're right, there should be block always afaik.

proycon added a commit that referenced this pull request Mar 26, 2024
@oktaal
Copy link
Contributor Author

oktaal commented Apr 3, 2024

Yes the file had this structure and was a bit weird. The document only contained a list of words, so in the end it wasn't really that useful to parse anyway.

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.

3 participants