Angular parser should not treat table data cells like block elements.
See original GitHub issuePrettier 1.15.2 Playground link
--parser angular
Input:
<table>
<tr>
<td class="somethingReallyReallyLong" data-test="somethingElse">{{ someValue }}</td>
</tr>
</table>
Output:
<table>
<tr>
<td class="somethingReallyReallyLong" data-test="somethingElse">
{{ someValue }}
</td>
</tr>
</table>
Expected behavior: Something more like this :
<table>
<tr>
<td class="somethingReallyReallyLong" data-test="somethingElse">{{
someValue
}}</td>
</tr>
</table>
The td
tag should be treated the same way as span
tags because white space is sensitive within a td
.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:11 (6 by maintainers)
Top Results From Across the Web
Angular formatter line breaks in double-curly braces cause ...
Angular formatter line breaks in double-curly braces cause ... Angular parser should not treat table data cells like block elements. #5452.
Read more >How whitespace is handled by HTML, CSS, and in the DOM
This is so that whitespace characters don't impact the layout of your page. Creating space around and inside elements is the job of...
Read more >How to remove unwanted space between rows and columns ...
I've tried changing the margin, padding, and various border properties on the table and tr and td. I want the pictures to all...
Read more >CSS Syntax Module Level 3 - W3C
This module defines the abstract syntax and parsing of CSS stylesheets and other things which use CSS syntax (such as the HTML style ......
Read more >  and HTML Space Challenges and Tricks | Mailtrap Blog
You've got to admit, the code above is not very readable. At the same time, creating multiple spaces with the use of  ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I tried it on Chrome and it seems the whitespaces are insensitive there, could you share more info? or did you change their
display
?Seems to be a duplicate of #5463: inserting white spaces around an interpolation breaks tests.