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

Trim optimization in 2023.10.15-405/407 considers E and Q as whitespace #91

Open
AndyCorlin opened this issue Jan 29, 2024 · 1 comment

Comments

@AndyCorlin
Copy link

Trim optimization in 2023.10.15-405/407 considers E and Q as whitespace.

(str/trim "Q dog slurped all Q")
=> "dog slurped all"

@AndyCorlin
Copy link
Author

Something wrong with the built-in regexp?

(def ^:private trim-default-re
  (-> "\n\f\r\t " rx/escape str->trim-re))

(.toString trim-default-re)
=> "^[\\Q\\Q\n\f\r\t \\E\\\\E\\Q\\E]+|[\\Q\\Q\n\f\r\t \\E\\\\E\\Q\\E]+$"

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