GuillaumeGomez / minifier-rs

Minifier tool/lib for JS/CSS/JSON files
MIT License
86 stars 16 forks source link

highlight.js is broken after minified #59

Open magiclen opened 4 years ago

magiclen commented 4 years ago

Steps to Reproduce

  1. Go to this page and find the Custom package section.
  2. Cancel all languages.
  3. Click the Download button.
  4. Decompress highlight.zip.
  5. Include highlight.pack.js in a HTML file like below.
<!DOCTYPE html>
<html>
<head>
    <script src="highlight.pack.js"></script>
</head>
<body></body>
</html>

At this moment, use a web browser to open the HTML file. No errors are shown on the console.

  1. Minify highlight.pack.js by using minifier 0.0.32 ~ 0.0.36.
  2. Use a web browser to open the HTML file. The console shows Uncaught SyntaxError: Unexpected token '}'.
GuillaumeGomez commented 4 years ago

Thanks, I'll take a look as soon as I can.