apacheconfig icon indicating copy to clipboard operation
apacheconfig copied to clipboard

Blank space after heredoc terminator is causing incorrect parsing

Open bpradeep20 opened this issue 7 years ago • 4 comments

Config:

# comment
  
TAG << MYTAG

some line

MYTAG # comment2

<tag>
    key value
</tag>

Please note extra space after second MYTAG keyword.

with python parser:

{}

Also for config:

TAG << MYTAG
some line
MYTAG # comment

I am getting

raise ApacheConfigError("Parser error at '%s'" % p.value if p else 'Unexpected EOF')

apacheconfig.error.ApacheConfigError: Unexpected EOF

Can you please check?

bpradeep20 avatar Nov 14 '18 04:11 bpradeep20

Oh, may be Perl approach is more fragile... At least with bash the delimiter must be alone not be terminating line...

We could probably introduce an option to support Perl behavior conditionally...

etingof avatar Nov 14 '18 11:11 etingof

That would be great if we can have Perl behavior working as well.

bpradeep20 avatar Dec 05 '18 04:12 bpradeep20

I am also facing similar issue. Is the option to support Perl behavior added ?

Sumit3 avatar Feb 26 '19 07:02 Sumit3

Have we introduced any option to support this ?

ssumit3 avatar Jun 24 '20 12:06 ssumit3