jahaziel17 / wro4j

Automatically exported from code.google.com/p/wro4j
0 stars 0 forks source link

Combining a javascript file that ends with a comment (without a newline) results in unexpected output #813

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create x.js with this content:

---
console.log("X") //comment

---
DO NOT end the file with a new line (this file has 0 new lines in it).
2. Create y.js with this content:

---
console.log("Y")
3. Create a WRO group called "xy":
  <group name="xy">
    <js>x.js</js>
    <css>y.css</css>
  </group>
4. Look at http://localhost:8080/wro/xy.js?minimize=false

What is the expected output? What do you see instead?
The expected output is:
--
console.log("X") //comment;
console.log("Y");
--

The actual output is:
--
console.log("X") //comment;console.log("Y");
--
The actual output won't execute the console.log("Y") statement, which is the 
problem.

Original issue reported on code.google.com by candrews...@gmail.com on 15 Nov 2013 at 4:41

GoogleCodeExporter commented 8 years ago

Original comment by alex.obj...@gmail.com on 17 Nov 2013 at 8:41

GoogleCodeExporter commented 8 years ago
Fixed in branch 1.7.x

Original comment by alex.obj...@gmail.com on 17 Nov 2013 at 11:09