Repository navigation
Fixed
The code compressor could silently delete real code before it reached the model: C-style comment stripping was applied to every language (Python //, YAML URLs, shell globs such as build/*), and JavaScript regex literals, nested templates and URLs could be cut.
- Comments are stripped only in C-style languages; unknown languages only lose whole-line comments.
- JavaScript regex literals, nested templates, CRLF line continuations, division after
++,--or!, and Rust lifetimes are preserved in the tested cases. aggressiveno longer flattens indentation in Python/YAML for files up to 40 lines..mts/.ctsare treated as TypeScript.- Much faster on long runs of spaces. On ~1 MB of realistic JavaScript it is about 2x slower than v1.0.0.
Known limitations
Comment removal is a heuristic, not a parser. Check the original file before relying on compressed code. In addition to the cases in the README, these can still delete code that v1.0.0 kept:
- JSX where
}is followed by/{(for example{n}/{max}) on a line that later has quoted attributes containing//or/*(such asaccept="image/*"). - Rare division cases read as a regex:
of/awaitused as variable names,.newsplit across lines, non-ASCII identifiers ending in a keyword, TypeScript'x'!ortotal !. - JavaScript regex literals longer than 4096 characters, or starting with a space right after
}, are not recognized as regex (same as v1.0.0).