Long string literal bug in ruby-mode.el?

Discussion in 'Ruby' started by John Lam, May 2, 2005.

  1. John Lam

    John Lam Guest

    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
    John Lam, May 2, 2005
    #1
    1. Advertising

  2. John Lam

    Jim Menard Guest

    John Lam wrote:
    > 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
    --
    Jim Menard, , http://www.io.com/~jimm
    "Cheat sheet for the 21st century: Closed, bad. Open, good." -- Wired
    Jim Menard, May 2, 2005
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. John J Lee
    Replies:
    3
    Views:
    448
    bruno at modulix
    Dec 1, 2005
  2. Edward Loper
    Replies:
    0
    Views:
    440
    Edward Loper
    Aug 7, 2007
  3. John J Lee
    Replies:
    0
    Views:
    498
    John J Lee
    Aug 7, 2007
  4. Edward Loper

    mmm-mode, python-mode and doctest-mode?

    Edward Loper, Aug 9, 2007, in forum: Python
    Replies:
    0
    Views:
    410
    Edward Loper
    Aug 9, 2007
  5. Anonieko Ramos

    What's wrong with rpc-literal? Why use doc-literal?

    Anonieko Ramos, Sep 27, 2004, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    356
    Anonieko Ramos
    Sep 27, 2004
Loading...

Share This Page