-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Closed
Labels
P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentAn issue that is relevant to core functions, but does not impede progress. Important, but not urgenthelp wantedThe team would appreciate a PR from the community to address this issueThe team would appreciate a PR from the community to address this issue
Description
Bug, feature request, or proposal:
Bug
What is the expected behavior?
The string representing a component's template should not have a whitespace as the last character.
What is the current behavior?
Every material component's template appends a whitespace at the end of the string in the JS transpiled file.
What are the steps to reproduce?
<button md-button class="increment" (click)="increment()">A+</button>
will be translated into :
<button class="increment" md-button=""><span class="md-button-wrapper">A+</span> </button>
... see the whitespace just before </button> ?
It will be appended before the closing tag of any material element whose template file has a new line before the EndOfFile...
What is the use-case or motivation for changing an existing behavior?
the following test should work :
it('should display a button that reads "A+" ', () => {
const buttonContent = button.textContent;
expect(buttonContent).toEqual('A+');
});
Which versions of Angular, Material, OS, browsers are affected?
Any version that follows the official style guide's linting recommendations.
Is there anything else we should know?
You're awesome !
Metadata
Metadata
Assignees
Labels
P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentAn issue that is relevant to core functions, but does not impede progress. Important, but not urgenthelp wantedThe team would appreciate a PR from the community to address this issueThe team would appreciate a PR from the community to address this issue