language-tools icon indicating copy to clipboard operation
language-tools copied to clipboard

pre tag format error

Open SevenJoker opened this issue 1 year ago • 1 comments

Vue - Official extension or vue-tsc version

2.0.28

VSCode version

1.92.2

Vue version

3.4.21

TypeScript version

5.4.0

System Info

window10

Steps to reproduce

image

What is expected?

Labels are not properly aligned and indented

What is actually happening?

Labels are not properly aligned and indented

Link to minimal reproduction

No response

Any additional comments?

No response

SevenJoker avatar Aug 22 '24 17:08 SevenJoker

@SevenJoker <pre> tags are supposed to respect the content inside as raw. That is, unlike other HTML tags, the <pre> content is supposed to be rendered "as is", with newlines, spaces and tabs. I believe these tags cannot be formatted in the same way as everyting else, potentially breaking the initial purpose of the user.

That is:

<pre>This text has no space before and no space after<pre>

Is not equal to:

<pre>
  This text has newlines and spaces before and after
<pre>

In the second example, the browser is expected to render the line breaks and the spaces.

ludwig801 avatar Sep 02 '24 08:09 ludwig801