You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Warning for consecutive lines that are comments #223
With #211 (v0.10.4), if there are consecutive lines that are comments, there will be a warning for each line after the first. because key and value will be None, passing the check for the warning. The only reason the first line does not have a warning is because it is considered as part of the line before, since the regular expression for comments captures any whitespace, including newlines, at the beginning.
Thank you so much for reporting this. It's indeed an issue and I think there would even be an unwanted warning with just one comment-only line. I'm hoping that #224 will fix this.
Currently, just one comment-only line doesn't prompt a warning, for the same reason the first line in consecutive lines of comments doesn't. That is, it's captured when the line before the comment line is parsed, because the regular expression for comments captures the newline between the two lines.
Activity
bbc2 commentedon Jan 18, 2020
Thank you so much for reporting this. It's indeed an issue and I think there would even be an unwanted warning with just one comment-only line. I'm hoping that #224 will fix this.
Harmon758 commentedon Jan 18, 2020
Currently, just one comment-only line doesn't prompt a warning, for the same reason the first line in consecutive lines of comments doesn't. That is, it's captured when the line before the comment line is parsed, because the regular expression for comments captures the newline between the two lines.
bbc2 commentedon Jan 19, 2020
I think I see what you mean:
But I found out that just the following also causes a warning:
Anyway, I think I fixed it with the latest MR. And I've also avoided the capture of newlines preceding comments so that debugging is easier.
Harmon758 commentedon Jan 19, 2020
That's what I meant, yeah. Thanks!