Skip to content

Fix error throws on unclosed tag in pre#7392

Merged
alexander-akait merged 1 commit intoprettier:masterfrom
fisker:unclosed-tag-in-pre
Jan 20, 2020
Merged

Fix error throws on unclosed tag in pre#7392
alexander-akait merged 1 commit intoprettier:masterfrom
fisker:unclosed-tag-in-pre

Conversation

@fisker
Copy link
Copy Markdown
Member

@fisker fisker commented Jan 18, 2020

fixes: #6028

  • I’ve added tests to confirm my change works.
  • (If changing the API or CLI) I’ve documented the changes I’ve made (in the docs/ directory)
  • (If the change is user-facing) I’ve added my changes to changelog_unreleased/*/pr-XXXX.md file following changelog_unreleased/TEMPLATE.md.
  • I’ve read the contributing guidelines.

Try the playground for this PR

@fisker fisker force-pushed the unclosed-tag-in-pre branch from 89bdd6c to a762f6a Compare January 18, 2020 13:49
@fisker fisker marked this pull request as ready for review January 18, 2020 13:56
@thorn0
Copy link
Copy Markdown
Member

thorn0 commented Jan 18, 2020

A separate issue probably, but related:

Prettier pr-7392
Playground link

--parser html

Input:

<pre><br> </pre>

Output:

<pre><br> </pre>

Expected:

<pre><br /> </pre>

@thorn0
Copy link
Copy Markdown
Member

thorn0 commented Jan 18, 2020

Or is it a feature? Tags aren't formatted inside <pre>:

Prettier 1.19.1
Playground link

--parser html

Input:

<pre> <b >f</b  ></pre  >

Output:

<pre> <b >f</b  ></pre>

@fisker
Copy link
Copy Markdown
Member Author

fisker commented Jan 19, 2020

@thorn0 It's todo

// TODO: handle non-text children in <pre>

@alexander-akait alexander-akait merged commit 5330d9d into prettier:master Jan 20, 2020
@fisker fisker deleted the unclosed-tag-in-pre branch January 20, 2020 12:30
@lock lock bot added the locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting. label Apr 19, 2020
@lock lock bot locked as resolved and limited conversation to collaborators Apr 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

<br>tag at the end of <pre>-tag gives error

3 participants