Skip to content
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

Bugfix whitespace newlines #1

Closed
wants to merge 3 commits into from
Closed

Bugfix whitespace newlines #1

wants to merge 3 commits into from

Conversation

basbloemsaat
Copy link
Contributor

Enters have meaning as white space in html (https://www.w3.org/TR/html5/infrastructure.html#space-character). So removing a newline without regard for context can result in altering the html.

E.g.

<span>blah</span>
<span>blah</span>

should render with a space as

blah blah

```html
<span>blah</span>
<span>blah</span>
```

should render with a space as
```
blah blah
```
@leejo
Copy link
Owner

leejo commented Jan 13, 2016

Thanks - looks like this is failing some tests on the CI, can you take a look? Also, i think this would be better implemented as an option rather than the default, despite what the W3C says, for backwards compat reasons.

@leejo
Copy link
Owner

leejo commented Jan 13, 2016

Actually lets make this the default, so just go ahead and fix the test failures (would be also better to squash these commits down so we don't have a commit that breaks the tests). Ta!

@basbloemsaat
Copy link
Contributor Author

Thanks die the quick reaction. I will look into it later this afternoon.
On Jan 13, 2016 2:34 PM, "Lee J" notifications@github.com wrote:

Actually lets make this the default, so just go ahead and fix the test
failures (would be also better to squash these commits down so we don't
have a commit that breaks the tests). Ta!


Reply to this email directly or view it on GitHub
#1 (comment).

leejo added a commit that referenced this pull request Jan 25, 2016
replace use of $self in the reggrp_data closures that was causing
the following memory cycle (amongst others):

	Cycle #1
		HTML::Packer A->{_reggrp_global} => Regexp::RegGrp B
		Regexp::RegGrp B->{_reggrp} => @C
		@c->[2] => Regexp::RegGrp::Data D
		Regexp::RegGrp::Data D->{_store} => &E
		closure &E, $self => $F
		$F => HTML::Packer A

now we are using package variables set when minify is called thus
handle any change to the state and remove the cycles
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants