# Re: [racket-users] Readtable extensions and syntax coloring in DrRacket

Hi Brendan,

I'm wondering if you tried the here string syntax for your use case,
which other than the fact that it requires a couple of newlines seems
similar in vein to what you were going for (e.g. it doesn't escape
anything)?

racket
> #<<HI
Any text here, and nothing gets escaped, This is somewhat surprising.
HI
"Any text here, and nothing gets escaped. This is somewhat surprising."


Cheers,

Andrew

On Mon, May 1, 2017 at 2:37 PM, brendan <bren...@cannells.com> wrote:
> I wrote a little Racket meta-language that adds a dispatch macro to the
> readtable for typing string literals without escape characters. You start
> with two or more #'s followed by any non-# character, then the actual string
> content, then end with the same non-# character and the same number of #'s. So
>
>> ##|"foo\bar"|##
>
> evaluates the same as
>
>> "\"foo\\bar\""
>
> Works great, but it does wreak quite some havoc on DrRacket's syntax
> coloring. Unfortunately as far as I can tell the only way to fix that is to
> replace the color lexer entirely; there's no compositon like there is with
> readtables. Is that correct, or is there a trick that I'm missing?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> For more options, visit https://groups.google.com/d/optout.

--
http://www.apgwoz.com

--
You received this message because you are subscribed to the Google Groups
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email