Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit aaa069a

Browse files
ivomjugkalpak
authored andcommitted
fix($compile): removing unnecessary white space in element-transclusion comments
Fixes #14549 Closes #14550
1 parent 707664a commit aaa069a

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/ng/compile.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1621,7 +1621,8 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
16211621
compile.$$createComment = function(directiveName, comment) {
16221622
var content = '';
16231623
if (debugInfoEnabled) {
1624-
content = ' ' + (directiveName || '') + ': ' + (comment || '') + ' ';
1624+
content = ' ' + (directiveName || '') + ': ';
1625+
if (comment) content += comment + ' ';
16251626
}
16261627
return window.document.createComment(content);
16271628
};

test/ng/compileSpec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -8438,7 +8438,7 @@ describe('$compile', function() {
84388438
expect(function() {
84398439
$compile('<div first second></div>');
84408440
}).toThrowMinErr('$compile', 'multidir', 'Multiple directives [first, second] asking for transclusion on: ' +
8441-
'<!-- first: -->');
8441+
'<!-- first: -->');
84428442
});
84438443
});
84448444

0 commit comments

Comments
 (0)