Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In release mode, the "minification" of shell.html remove spaces that should not be removed #22188

Open
ypujante opened this issue Jul 4, 2024 · 1 comment

Comments

@ypujante
Copy link
Contributor

ypujante commented Jul 4, 2024

Please include the following in your bug report:

Version of emscripten/emsdk:
3.1.61

I have a custom shell.html that I provide to emcc via the --shell-file= option.

When I do a build in release mode (with optimizations), shell.html gets minified.

Here is an excerpt:

<p>This tool has no tracking, ads or server-side component: it is running 100% in your browser. It uses<a href=https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage>localStorage</a>to store information across browser sessions.</p><p>You can provide feedback or report issues on<a href=https://github.com/pongasoft/webgpu-shader-toy>GitHub</a>.</p>

This is the original:

<p>This tool has no tracking, ads or server-side component: it is running 100% in your browser. It uses <a href="https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage">localStorage</a> to store information across browser sessions. </p>
<p>You can provide feedback or report issues on <a href="https://github.com/pongasoft/webgpu-shader-toy">GitHub</a>.</p>

As you can see all the spaces BEFORE and AFTER all anchor tags are removed which makes the rendering wrong and TBH quite unreadable...

Screenshot 2024-07-04 at 11 46 26
@kripken
Copy link
Member

kripken commented Jul 9, 2024

The tool we use to minify HTML is html-minifier-terser, called from here:

def minify_html(filename):

Perhaps adjusting the flags there can fix this? Or perhaps this is a bug in that project?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants