#95 Single quote in HERE docs breaks color coding.

Editor (234)

HTML contained in "HERE" docs can break the color
coding of the remainder of the document if it happens
to contain a single quote, as in the case of an
apostrophe. Once the color coding hits an apostophe,
the remainder of the code is a nice solid blue. One
example is as follows:

my $helpContent = <<HTML;
<p>(...)Examples of publications are User's Guides,
Technical Specifications Sheets, Set Up Guides, etc.</p>


  • LeO

    LeO - 2004-10-14

    Logged In: YES

    Yeah, but how shall the Editor recognize it is a Quote or not?

    We are within a Perl-Editor and not within a HTML-Editor!!!

  • Nobody/Anonymous

    Logged In: NO

    I apologize if I have offended the purists by using the
    acronyms HTML and Perl together, but I personally find
    mod_perl to be exceptional in the web application space.
    One of the essential components for me in that environment
    naturally are HERE docs. Of course, HERE docs can also be
    used in other endeavors besides the dreadfully offensive
    HTML. As such, I was simply trying to state that a single
    quote, and possibly other nonescaped characters, in a HERE
    doc can break the color coding. My natural thought was that
    a HERE doc is simply syntax, and an element that perl
    obviously can recognize. And my hope was that it wouldn't
    be that hard to add the ability for the color coding routine
    to recognize the same and color the whole HERE document the
    same color, resuming the coloring for the rest of the code
    at the conclusion of said HERE doc, rather than evaluating
    the non escaped characters in the HERE doc and miscoloring
    the rest of the doc. Rest assured that I was not asking for
    HTML color coding. And I would like to add that I certainly
    appreciate your guys efforts. EPIC is looking great, and I
    really love the subroutine folding in the dev version!

  • LeO

    LeO - 2004-10-15
    • assigned_to: nobody --> leo_forge
  • LeO

    LeO - 2004-10-15

    Logged In: YES

    Hm', don't wanna say we are THAT purist, but this has to be
    configured. And you are welcomed to join the team ;) Since
    it seems you have more knowledge and time currently for this
    issue, then we have.

    The color-sync is done in
    \plugins\org.epic.ext.cbg.editor_0.3.0\modes\perl.xml and
    search for something like


    which is the example for the quoting issue. So, you can try
    it with inserting the start <HTML; and End with > If it
    works, then submit the file to us, resp. attach it to the
    entry. You do not even have to download the sources from
    CVS, you have already the file with you.

    You should choose carefully, which Delegate-Type you
    consider. Perhaps it's a good idea to create a new one - but
    frankly said, don't know how to do it.

    We are waiting for your response ;)))

  • chris

    chris - 2004-10-19

    Logged In: YES

    Thanks for the info Leo!

    Bummer. So yeah, I see the dilemma now. :- ) Unless anyone
    knows how to put a regex in a declaration, I'm not sure
    there is an easy solution. When I looked in the file Leo
    mentioned below (God bless XML), I noticed that there is
    already one in there for the <<EOH; tag. Because Perl lets
    you pick your own handle for the here-doc, to work properly
    the routine would need to match <<(ANYTHING); and then end
    on a line starting with (ANYTHING) and a newline. Ah, if
    only it had the power of the regex. But with your tips, I
    was able to address my issue with a workaround by just
    adding 2 declarations, one for the <<HTML and one for the
    <<XML handles that I personally use, so now I can start
    using eclipse/epic! :- ) The ability to personalize the
    color coding for your own environment and style with a
    simple XML file is very very cool indeed. Maybe it could be
    good material for an FAQ since there's not really a good
    alternative solution?

    Thanks again for the help and info!

  • LeO

    LeO - 2004-10-19

    Logged In: YES

    May I add an suggestion:

    Why not add it in the Users document? Find an appropriate
    section, and insert it? And if you've done it, attach it to this
    bug, resp. send it to the owner of the group.

    This would help other and us as developers to free our hands
    for other issues.

  • LeO

    LeO - 2005-01-25

    Logged In: YES

    Fixed in 0.3.9.

    99.5% of legal HERE-Types are supported! The rest - too much
    work - sorry.

  • LeO

    LeO - 2005-01-25
    • status: open --> closed-fixed

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks