-
-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trim line breaks #19
Comments
there should be no ambiguity in parsing |
What do you mean? |
Currently, I'm trying to do this in
should end up like this:
and not like this:
|
if it's part of |
Remove whitespace at the start/end of the first/last text node. Details: posthtml/posthtml-include#19
Check this out: posthtml/posthtml-extend#14 |
There's a potential smell to this request. See normalize-html-whitespace. |
I think it’s suitable for this case posthtml-beautify |
Then it might be impossible to keep the original project indentation intact (see posthtml/posthtml-beautify#220 and posthtml/posthtml-beautify#222) if we will try to fix this later with another tool like |
@andreyvolokitin I’ll try to figure it out, so far I don’t really understand how it should work |
I think I've done something similar for |
Any chance to get this fixed in posthtml-include? I agree with Andrey that the included snippet shouldn't contain extra newlines beyond its bounds. Text editors do tend to add a single trailing newline to files. |
It makes sense to remove line breaks from start and end of the included tree (especially considering that line break at the end is often inserted automatically by code editor)
or
The text was updated successfully, but these errors were encountered: