html-minifier-terser icon indicating copy to clipboard operation
html-minifier-terser copied to clipboard

[Bug]: Does not preserve white space around custom web components

Open rgant opened this issue 9 months ago • 0 comments

What happened?

Web components default to display inline. But since this tool maintains a list of specific tag names to consider inline it does not include web components.

For example:

test('custom components inline', async () => {
  const input = 'George said <custom-component>Oh, my.</custom-component>';
  const output = 'George said <custom-component>Oh, my.</custom-component>';
  expect(await minify(input)).toBe(output);
});

Version

7.2.0

What browsers are you seeing the problem on?

Chrome

Link to reproduce

No response

Relevant log output


Willing to submit a PR?

Yes

rgant avatar Mar 03 '25 02:03 rgant