build-your-own-angularjs icon indicating copy to clipboard operation
build-your-own-angularjs copied to clipboard

P128: Unescaped ' character in string

Open ajdaniel opened this issue 9 years ago • 1 comments
trafficstars

The first test case in this page starts with it('inherits the parent's properties', function() { If you copy and paste this (as I did) then this will cause a problem because the ' character needs to be escaped.

Suggested fix: it('inherits the parent\'s properties', function() {

or it("inherits the parent's properties", function() {

I prefer the former because it is consistent with the rest of the test examples for scope.

ajdaniel avatar Jun 04 '16 11:06 ajdaniel

If you really don't want to confuse the reader by throwing in escaped characters the test name could simply be 'inherits the properties of the parent'.

ajdaniel avatar Jun 04 '16 11:06 ajdaniel