So now non-trailing SourceMappingURL comments are matched as well.
Changed: sourceMappingURL comments used to be matched only if they appeared on their own line. However, the spec only says:
The generated code may include a line at the end of the source, with the following form:
So now they are matched also when they appear on the same line as code.
.set() method. I couldn’t decide how it should work considering the above change. Moreover, it was unnecessarily complex (and would have gotten worse) for very little gain. It is much easier to run
.remove() if needed, and then simply
code += "\n//# sourceMappingURL=" + url (using the appropriate comment syntax and newline). KISS.
.insertBefore() method now always inserts the string exactly before the sourceMappingURL comment; not before the newline before the comment (if any). Moreover, it does not ensure that the comment will be on a new line anymore. This is up to the caller. KISS.
.remove() method no longer removes the newline before the sourceMappingURL (if any).
["/*", " */"]instead of
["/*", "*/"]). (Backwards incompatible change.)