Remove trailing whitespace in inlined templates
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 !
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.