chyingp / grunt-inline

Brings externally referenced resources, such as js, css and images, into a single file.
MIT License
87 stars 55 forks source link

Inlined <script>s get removed! #82

Open Boscop opened 7 years ago

Boscop commented 7 years ago

When I have multiple <script> tags in one line in the html file, the inline script is removed. E.g.:

<!DOCTYPE html>
<html lang="en">
<head>
  <title></title>
  <meta charset="utf-8" />
  <script>var foo=null;</script><script src="bar.js"></script>
</head>
<body>
</body>
</html>

When I run grunt inline, it turns into:

<!DOCTYPE html>
<html lang="en">
<head>
  <title></title>
  <meta charset="utf-8" />
  <script>
  <!-- contents of bar.js -->
  </script>
</head>
<body>
</body>
</html>

So my own inline script <script>var foo=null;</script> is gone after the inlining! If I put the inline Githubissues.

  • Githubissues is a development platform for aggregating issues.