apacheconfig icon indicating copy to clipboard operation
apacheconfig copied to clipboard

Initial newline and whitespaces ignored by perl parser but not by python parser

Open Sumit3 opened this issue 7 years ago • 1 comments

Perl Config::General module ignores the initial newline characters and white-spaces in the beginning of heredoc but this python parser doesn't. eg:

Config :

PERL <<END_OF_CODE


    line1;
line2;
END_OF_CODE

With Perl parser: {"PERL":"line1;\nline2;"}

With Python parser: {'PERL': '\n\n line1;\nline2;'}

Do you think if this behavior should be improved ?

Sumit3 avatar Jan 04 '19 08:01 Sumit3

That should be easy to fix by adding an option that leads to stripping white spaces. I am tempted to ask @sydneyli if this is something that might come up soon? ;-)

etingof avatar Aug 18 '19 10:08 etingof