Closed huangyxi closed 10 months ago
This will only partially work because I don't think we have any accommodations for forcing comments to be at the start of a line. That might be worth opening a feature request to track as it may affect other formats as well. I can merge this but results will be a little bit inconsistent since most of the macros assume comments can start anywhere in a line.
Thank you for your response and for identifying a generic issue in commenting.
I agree with the point that the current modification may not strictly follow the official document, potentially leading to inconsistency. However, in this specific situation, commenting whether at the start of a line doesn't actually affect the final result. Since the initial release of Linux-PAM on GitHub in June 2000, leading white spaces have been skipped before the comment sign #
detection. And I have confirmed this on an Ubuntu machine.
// `/modules/pam_env/pam_env.c`
/* skip leading white space */
key += strspn(key, " \n\t");
/* skip blanks lines and comments */
if (!key || key[0] == '#')
continue;
initial commit of above lines in linux-pam current commit of above lines in linux-pam
Anyway, I understand and respect the decision, whether it involves merging this pull request or not.