
Script of the day: Don’t wait for @notjack’s resyntax, fix your #t
and #f
https://gist.github.com/Metaxal/52ec3ee6fc43b0e8917d19c3daf2c57b\|today! #lang racket/base
;;; License: [Apache License, Version 2.0](<http://www.apache.org/licenses/LICENSE-2.0>) or
;;; [MIT license](<http://opensource.org/licenses/MIT>) at your option.
(require quickscript)
(script-help-string
"Replaces all occurrences of #t and #f with #true and #false in the selected text (warning: in strings too!)")
(define-script fix-true-false
#:label "fix-true-false"
(λ (selection)
(regexp-replaces selection '([#px"#t\\b" "#true"] [#px"#f\\b" "#false"]))))

You gotta submit this for Racket News! I’d love for the full code to be included in racket news as it is so short.

I guess you could make it even yummier: (define-script fix-true-false
#:label "fix-true-false"
(λ (selection)
(regexp-replaces selection '([#px"#t\\b" "#true"] [#px"#f\\b" "#false"]))))
(edit: top post edited too)

I’m going to post on racket-users - if you don’t mind?