(JSX) period after anchor tag is moved to newline before break
See original GitHub issuePrettier 1.14.2 Playground link
--parser babylon
Input:
const comp = () => (
<p>
<a href="https://example.com" style={{ color: "inherit", fontWeight: 600 }}>
link
</a>.
<br />
</p>
);
Output:
const comp = () => (
<p>
<a href="https://example.com" style={{ color: "inherit", fontWeight: 600 }}>
link
</a>
.<br />
</p>
);
Expected behavior:
For the output to match the input. (.
after </a>
, not before <br />
)
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:10 (7 by maintainers)
Top Results From Across the Web
forced line break after span coming from react, next or ...
A possible solution would be replacing it with display: inline instead. .phone-msg { display: inline; white-space: nowrap; }.
Read more >How to avoid a new line with tag? - GeeksforGeeks
By default, the browser applies a line break before and after the p tag to separate the paragraphs. We can achieve this by...
Read more >When a Line Doesn't Break - CSS-Tricks
We expect a line to break when the text on that line reaches the parent box boundaries. We see this every time we...
Read more >word-break - CSS: Cascading Style Sheets - MDN Web Docs
The word-break property is specified as a single keyword chosen from the list of values below. Values. normal. Use the default line break...
Read more >How to add a forced line break inside a table cell - TeX
\begin{tabular}{|p{2cm}|p{2cm}|} \hline Test & foo \newline bar \\ ... Edit: Use the following commands instead of p if you want to specify the...
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 Free
Top 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
@duailibe I bisected, it’s from #4717, cc @karl
Ah that could work!
I won’t have time to work on this for a few days, so if anyone else want to pick this up please go ahead. Otherwise I’ll look at picking it up when I can.
On Mon, Sep 10, 2018 at 12:26 PM Simen Bekkhus notifications@github.com wrote: