So now non-trailing SourceMappingURL comments are matched as well.
The generated code may include a line at the end of the source, with the following form:
//# sourceMappingURL=<url>
So now they are matched also when they appear on the same line as code.
Removed: The .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.
Changed: The .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.
Changed: The .remove()
method no longer removes the newline before the
sourceMappingURL (if any).
Changed: Renamed .get()
to .getFrom()
.
Changed: Renamed .remove()
to .removeFrom()
.
Added: The .existsIn()
method.
["/*", " */"]
instead of ["/*", "*/"]
). (Backwards
incompatible change.)