Closed alessandro-fazzi closed 3 years ago
Hello,
You can also just add a .
and so nothing is printed in the output:
// Buffered comment
| Foo
// Buffered comment
.
To get the exact indent of the source code in your comment you also can use:
<!-- Buffered comment -->
| Foo
<!-- Buffered comment -->
I don't think I will fix this. But if someone want to propose a pull-request for this I would be glad to review and merge it if it does not break any other syntax.
Thanks.
Thanks for your alternative suggestions; the .
is a nicer workaround and I'd be ok to use plain HTML comments in my scenario.
I'll also live in peace with this "thing" not fixed ;) and I thank you for your kind and quick reply.
Best
Hello,
I encountered an issue with the following code:
I expected to get:
But I actually get:
Removing the newline will fix it, but having a comment at the end of the file will require a newline (at least to not be blamed by GIT). Another way to fix it is to add an empty character as last line of my file
which code will bring to
and it's ok as a workaround, but I'd like to get the behaviour.
Keep in mind this is not merely for science: I'm dealing with "magic" comments in HTML which will be parsed and interpreted, thus I need to have a sturdy, specific formatting of the final HTML, not just valid.
The fact happens bot with and without pretty print.
As a final note about this behaviour:
outputs
Thanks in advance for you help and your time.