One function

JavascriptMinify in tikitu/jsmin

The author described this change as fix for #2. It counts as a record because the check below fails on the code as it stood at ede84efb0 and passes on a45d6e6cf, with nothing else changed between the two runs.

Fix saved2013-05-10
Sharing licenceMIT · LICENSE.txt
Change size+2 2

What the code was meant to do, written into the code itself as a docstring

Minify an input stream of javascript, writing to an output stream

The change

5050 return
5151
5252 while 1:
53- next2 = read(1)
53+ next2 = read(1)
5454 if not next2:
5555 last = next1.strip()
5656 if not (doing_single_comment or doing_multi_comment)\
102102 and (next2 in space_strings or next2 > '~'):
103103 do_space = True
104104 elif next1 == '/':
105- if (previous in ';\n\r{}' or previous < '!') and next2 in '/*':
105+ if (previous in ';,\n\r{}' or previous < '!') and next2 in '/*':
106106 if next2 == '/':
107107 doing_single_comment = True
108108 previous_before_comment = previous_non_space

The check that tells the two apart

failpass·jsmin/test.py::JsTests::testCommentInObj

Check file jsmin/test.py, taken without changes from the fix and copied onto the older code, so the exact same check runs against both versions.

Origin and history

The code before itede84efb0ab73142f8c5b78eb3a7cf2022920982
Broken version dated2013-05-10
Modulejsmin.__init__
Units changedJavascriptMinify
Fingerprintd14f79d8f8b0126a
Checked2026-08-18 by goldset/0.1

Every field above is generated by our program. None of it is written by hand.

Other bugs found in tikitu/jsmin