Skip to content

HTML: html transformer drops line breaks between <pre> tags #10204

@SirPepe

Description

@SirPepe

🐛 bug report

Parcel's HTML transformer drops line breaks between <pre> tags. Input;

<pre>




Hello</pre>

Output:

<pre>


Hello</pre>

This happens in both dev and production mode, so minification is probably not the culprit. Does not happen with Parcel 2.14.

🎛 Configuration (.babelrc, package.json, cli command)

Vanilla Parcel in production mode without any configuaration.

🤔 Expected Behavior

The html transformer should not drop line breaks.

😯 Current Behavior

The html transformer drops line breaks.

💁 Possible Solution

Don't drop line breaks.

💻 Code Sample

https://github.com/SirPepe/temp-parcel-html-line-breaks

🌍 Your Environment

Software Version(s)
Parcel 2.15.4
Node 23.7.0
npm/Yarn NPM @ 10.9.2
Operating System Ubuntu Linux, 6.8.0-64-generic

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions