Menu

heredoc highlighting confused by special characters

2013-07-26
2014-02-08
  • Philippe A.

    Philippe A. - 2013-07-26

    I would like to know if there is a way to fix this syntax highlighting issue by myself or if I need to create a bug report.

    I am planning to document bash scripts with perl pod. As in:

    <<=cut
    =pod

    pod stuff

    =cut

    This is perfectly valid in bash and also perfectly valid for pod2man or pod2html. I have borrowed this trick from this smart guy: http://bahut.alma.ch/2007/08/embedding-documentation-in-shell-script_16.html.

    My problem is that notepad++ does not seem to be accepting my heredoc end tag =cut in two ways. First, the heredoc block will not be highlighted. Second, it will not ignore single/double quotes inside the heredoc, causing large parts of my scripts to be incorrectly highlighted. In short, it entirely messes up legibility.

    Thanks for helping me figure this out.

     
  • Philippe A.

    Philippe A. - 2014-02-05

    Does anyone know how I can redefine Notepad++ conception of HERE DELIM? Currently, an HERE DELIM must start with a letter or a dash. If it starts with any other char, the here block will not be highlighted and quotes it contains will not be handled correctly.

    I write a lot of bash and I crave badly for a more flexible HERE DELIM.

    Thanks in advance for your help.

     
  • cchris

    cchris - 2014-02-08

    From your account, a standard feature of the bash language is no properly implemented in the Scintilla-provided lexer.
    So the right way is to post on scintilla.org about what would look like a bug in the lexer. When they fix it and N++ upgrades the version of Scintilla it uses, then the fix will come to N++.

    CChris