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.
Projecttikitu/jsmin
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
| 50 | 50 | return | |
| 51 | 51 | ||
| 52 | 52 | while 1: | |
| 53 | - | next2 = read(1) | |
| 53 | + | next2 = read(1) | |
| 54 | 54 | if not next2: | |
| 55 | 55 | last = next1.strip() | |
| 56 | 56 | if not (doing_single_comment or doing_multi_comment)\ | |
| ⋯ | |||
| 102 | 102 | and (next2 in space_strings or next2 > '~'): | |
| 103 | 103 | do_space = True | |
| 104 | 104 | elif next1 == '/': | |
| 105 | - | if (previous in ';\n\r{}' or previous < '!') and next2 in '/*': | |
| 105 | + | if (previous in ';,\n\r{}' or previous < '!') and next2 in '/*': | |
| 106 | 106 | if next2 == '/': | |
| 107 | 107 | doing_single_comment = True | |
| 108 | 108 | previous_before_comment = previous_non_space | |
The check that tells the two apart
fail→pass·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
- 2014-10-27Fix for issue #14: handle ECMAScript/Harmony backticks.
- 2013-10-18JavascriptMinify
- 2013-05-13JavascriptMinify