Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

u'\\\\\u1234' not fully minified #31

Open
gareth-rees opened this issue Jul 31, 2011 · 0 comments
Open

u'\\\\\u1234' not fully minified #31

gareth-rees opened this issue Jul 31, 2011 · 0 comments
Assignees

Comments

@gareth-rees
Copy link
Owner

The string u'\\\\\u1234' could be minified as ur'\\\u1234' for a saving of a character. I prevented this choice because it's absurdly tricky to get backslash-escaping correct in r-prefixed strings.

We mustn't minify u'\\\u1234' as ur'\\u1234' because those two strings are not the same: the first blackslash prevents the second from starting a Unicode escape sequence!

I'm afraid I punted on this one for the moment: at least it currently outputs an accurate result, if not the minimal one.

(Perhaps it would be easier to solve this by generate-and-test than by analysis.)

@ghost ghost assigned gareth-rees Jul 31, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant