Skip to content

Conversation

@kamilturek
Copy link
Contributor

@kamilturek kamilturek commented Nov 15, 2025

According to POSIX standard, newlines are NOT part of comments. Previously, shlex incorrectly consumed newlines when skipping comments, causing them to be lost even when excluded from the whitespace attribute.

If the current character is a '#', it and all subsequent characters up to, but excluding, the next <newline> shall be discarded as a comment. The <newline> that ends the line is not considered part of the comment.

https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_03

@kamilturek kamilturek marked this pull request as ready for review November 15, 2025 22:19
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.

1 participant