question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

<strong> tags breaking up in .HTML

See original GitHub issue

Hi, in my .html file, the following happens:

Expected result

          <p class="quote">
            <strong>"Lorem ipsum dolor sit amet consecetur lorem ipsum dolor sit
              consecetur."</strong>
          </p>

On save error

          <p class="quote">
            <strong
              >"Lorem ipsum dolor sit amet consecetur lorem ipsum dolor sit
              consecetur."</strong
            >
          </p>

Note how the tags are split up into new lines.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
alenlcommented, Dec 24, 2018

This is not only <strong>. Seems that if any tag has contents text that is longer than wrap-chars, the closing angle-bracket of the opening tag is always moved to the next line.

FWIW, adding a space after the opening tag will work around this issue. So, this will wrap correctly:

            <strong> "Lorem ipsum dolor sit amet consecetur lorem ipsum dolor sit
              consecetur."</strong>

(Note the added space after <strong>.)

1reaction
morikawa77commented, Aug 25, 2019

Breaking line after tag solve to me:

<strong>
  text
</strong>

There is a way to configure Prettier to do this automatically?

Read more comments on GitHub >

github_iconTop Results From Across the Web

My <strong> tags causing a line break? - HTML & CSS
It's a pretty rotten thing to do to you, though, to set <strong> to display: block.
Read more >
The Dos and Don'ts of Adding an HTML Line Break
To do a line break in HTML, use the <br> tag. Simply place the tag wherever you want to force a line break....
Read more >
display: flex breaks <li> element with Text and HTML-Tags like ...
If you few it on mobile the text just breaks lines in the middle of the text. Some of the text before the...
Read more >
HTML br tag - W3Schools
The <br> tag inserts a single line break. The <br> tag is useful for writing addresses or poems. The <br> tag is an...
Read more >
Add breaks and lines to your content - OpenClassrooms
To create line breaks in HTML, use the <br> tag. There is no closing tag necessary. <h3>Toby's Estate</ ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found