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

Do not remove empty entries in MiniYaml.FromString #11464

Merged
merged 2 commits into from Jun 18, 2016

Conversation

phrohdoh
Copy link
Member

This will fix cases of incorrect line numbers being reported.

http://logs.openra.net/?year=2016&month=06&day=17#15:34:02

[15:34:02] [Phrohdoh] Oh, duh. Empty lines are stripped before the IEnumerable is passed to FromLines, so that is why my line numbers are off.
[15:34:29] [Phrohdoh] Outside of not removing those, that isn't fixable.
[15:34:40] [pchote] is this in your code, or ours?
[15:34:43] [Phrohdoh] upstream
[15:34:53] [Phrohdoh] return FromLines(text.Split(new[] { "\r\n", "\n" }, StringSplitOptions.RemoveEmptyEntries), fileName);
[15:35:00] [Phrohdoh] MiniYaml:257
[15:35:01] [pchote] lets not do that, then
[15:35:17] [pchote] discard them at parse time, incrementing the line counter to mathc
[15:35:19] [pchote] *match
[15:35:23] [Phrohdoh] ok

@abcdefg30
Copy link
Member

👍

@obrakmann
Copy link
Contributor

👍

@obrakmann obrakmann merged commit ebf3222 into OpenRA:bleed Jun 18, 2016
@obrakmann
Copy link
Contributor

Changelog

@phrohdoh phrohdoh deleted the miniyaml-dont-strip-empty-lines branch June 18, 2016 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants