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

Commit 1116a96

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

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/ng/compile.js

Lines changed: 2 additions & 1 deletion
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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8407,7 +8407,7 @@ describe('$compile', function() {
84078407
expect(function() {
84088408
$compile('<div first second></div>');
84098409
}).toThrowMinErr('$compile', 'multidir', 'Multiple directives [first, second] asking for transclusion on: ' +
8410-
'<!-- first: -->');
8410+
'<!-- first: -->');
84118411
});
84128412
});
84138413

0 commit comments

Comments
 (0)