Long string literal bug in ruby-mode.el?

J

John Lam

If I have a string like

$def = <<-EOF

... big chunk of text

EOF

the syntax highlighting in ruby-mode breaks.

Is there a known workaround for this issue?

Thanks
-John
 
J

Jim Menard

John said:
If I have a string like

$def = <<-EOF

... big chunk of text

EOF

the syntax highlighting in ruby-mode breaks.

Is there a known workaround for this issue?

I don't know. I don't think it's the size of the text, though. I think that
font-lock-mode gets confused by quotes in some circumstances, like when they
are inside regexes inside strings or something like that. I will often add a
comment just after the EOF that "closes" the quote it thinks is open. If a
single quote doesn't work, then I try a double quote.

$def = <<-EOF
...
EOF
# ' <-- un-confuse Emacs font-lock-mode

Jim
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top