Roan Kattouw<roan.kattouw<at>
gmail.com> writes:
Actually, the line number would not mean a great
deal because the
scripts would still be combined, comments frequently take up entire
lines and the deminifier cannot account for blank lines, statements
broken over multiple lines, or multiple statements on one line. All
this means it's impossible to map the line number to a source line and
file, although I agree it does map it to a statement: someone else can
add a breakpoint at the same line of the same combined+minified output
(provided they're also hitting the same load.php URL) and have that
break at the exact statement the reporter got their error on.
It shouldn't be
too hard to have the minification script create a line number
translation table; just delay stripping newlines until the end, and create an
index of newline positions in the original and minified versions of the code.
(You would need error offsets for that to be useful, though; I don't know which
browsers provide that.)
Why not leave line endings in place (with multiple line endings
trimmed to one)? Or are the line endings a significant part of the
minification gain?