Skip to content
This repository has been archived by the owner on Feb 22, 2018. It is now read-only.

feat(TestBed): add whitespace handling to compile #1346

Closed
wants to merge 1 commit into from
Closed

feat(TestBed): add whitespace handling to compile #1346

wants to merge 1 commit into from

Conversation

ofagbemi
Copy link
Contributor

Add whitespace handling to the TestBed’s compile function.

Closes #1262. Previously, strings passed with leading or
trailing whitespace would be compiled incorrectly. Now,
valid HTML with arbitrary whitespace in and surrounding it
can be compiled properly.

@@ -58,12 +58,24 @@ class TestBed {
return rootElement;
}

String _handleWhitespace(html) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please move this private method after all public ones (I find it better to have the API first)

@mhevery
Copy link
Contributor

mhevery commented Aug 13, 2014

Thanks for your contribution! In order for us to be able to accept it, we ask you to sign our CLA (contributor's license agreement). CLA is important for us to be able to avoid legal troubles down the road.

For individuals (a simple click-through form): http://code.google.com/legal/individual-cla-v1.0.html

@mhevery mhevery added cla: no and removed cla: yes labels Aug 13, 2014
@ofagbemi
Copy link
Contributor Author

As you probably guessed, I'm far from a git expert. Again, very sorry. Did I make those changes properly?

return html.split('\n').map((line) {
var trimmed = line.trim();
return trimmed + (trimmed.isEmpty || trimmed.endsWith('>') ? '' : ' ');
}).join();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

return html.split('\n')
           .map((line) {
             var trimmed = line.trim();
             return trimmed + (trimmed.isEmpty || trimmed.endsWith('>') ? '' : ' '); })
           .join();

@vicb
Copy link
Contributor

vicb commented Aug 13, 2014

I'm far from a git expert. Again, very sorry.

No worries, you'll become an expert soon. You should squash the commit so that there is only 1 commit in your branch and then force push to github (push -f). You'll be ok the commit count on top of this page is "1".

Did I make those changes properly?

I have made a minor comment on the formatting

@ofagbemi
Copy link
Contributor Author

Alright, got it! Thanks so much for the help!

Add whitespace handling to the TestBed’s compile function.

Closes #1262. Previously, strings passed with leading or
trailing whitespace would be compiled incorrectly. Now,
valid HTML with arbitrary whitespace in and surrounding it
can be compiled properly.
@vicb
Copy link
Contributor

vicb commented Aug 13, 2014

👍

@mhevery
Copy link
Contributor

mhevery commented Aug 26, 2014

Achievement unlocked: CLA signature found!

@naomiblack
Copy link
Contributor

@jbdeboer can you please rebase and merge this one in?

jbdeboer pushed a commit to jbdeboer/angular.dart that referenced this pull request Aug 29, 2014
Add whitespace handling to the TestBed’s compile function.

Closes dart-archive#1262. Previously, strings passed with leading or
trailing whitespace would be compiled incorrectly. Now,
valid HTML with arbitrary whitespace in and surrounding it
can be compiled properly.

Closes dart-archive#1346
@jbdeboer
Copy link
Contributor

jbdeboer commented Sep 3, 2014

I have https://travis-ci.org/jbdeboer/angular.dart/builds/33932643 which looks good. I will run final tests tomorrow.

@chirayuk chirayuk force-pushed the master branch 2 times, most recently from 8fd235c to 50e2645 Compare September 5, 2014 23:10
jbdeboer pushed a commit to jbdeboer/angular.dart that referenced this pull request Sep 11, 2014
Add whitespace handling to the TestBed’s compile function.

Closes dart-archive#1262. Previously, strings passed with leading or
trailing whitespace would be compiled incorrectly. Now,
valid HTML with arbitrary whitespace in and surrounding it
can be compiled properly.

Closes dart-archive#1346
jbdeboer pushed a commit to jbdeboer/angular.dart that referenced this pull request Sep 11, 2014
Add whitespace handling to the TestBed’s compile function.

Closes dart-archive#1262. Previously, strings passed with leading or
trailing whitespace would be compiled incorrectly. Now,
valid HTML with arbitrary whitespace in and surrounding it
can be compiled properly.

Closes dart-archive#1346
vsavkin pushed a commit that referenced this pull request Sep 14, 2014
Add whitespace handling to the TestBed’s compile function.

Closes #1262. Previously, strings passed with leading or
trailing whitespace would be compiled incorrectly. Now,
valid HTML with arbitrary whitespace in and surrounding it
can be compiled properly.

Closes #1346

Closes #1445
@vsavkin vsavkin closed this in 5f5ce35 Sep 14, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

Successfully merging this pull request may close these issues.

fix(TestBed): TestBed toNodeList and whitespace
5 participants