#503 false raw string detection in C syntax highlighting

Next_major_release
wont-fix
nobody
None
1
2013-07-27
2013-07-09
Gur Stavi
No

http://sourceforge.net/p/notepad-plus/bugs/3942

Eliminate most C raw string false detection by testing the delimiter more thoroughly.

1 Attachments

Discussion

  • FLS
    FLS
    2013-07-14

    For this same bug, there are several related bugtickets and patches (see below).

    However, the above syntax highlighting issues are solved with the current Scintilla version 3.3.0 (or even before). Notepad++ (as of today) uses a slightly modified version based on Scintilla 2.2.7.
    I have updated/merged Scintilla for Notepad++ to 3.3.0 and tested the examples above successfully.
    Therefore, the special patch provided here is not really necessary. In my opinion, an upgrade to the current Scintilla version is more desirable.

    The patch for upgrade/merge of Notepad++ to Scintilla version 3.3.0 is provided at Patch #467

    Related Patches
    Patch #464
    Patch #467

    Related Bug Tickets
    BugTicket #3537
    BugTicket #3692
    BugTicket #3759
    BugTicket #3942

    FLS

     
    Last edit: FLS 2013-07-14
  • Don HO
    Don HO
    2013-07-23

    The patch should be submitted in Scintilla project, so Notepad++ will get the fix by updating new version of scintilla.
    Thank you anyway for your patch.

    Don

     
  • Don HO
    Don HO
    2013-07-23

    • status: open --> wont-fix
    • Priority: 5 --> 1
     
  • Gur Stavi
    Gur Stavi
    2013-07-24

    I downloaded SciTE 3.3.4.
    Its handling of raw string parsing is still lacking.
    Even if I could push a patch to Scintilla, how will it help users of Notepad++ that complained about this issue 2 years ago?

     
  • FLS
    FLS
    2013-07-26

    Dear Gur Stavi,
    I have tested the buggy examples provided in patch #464 and in bug #3942 with the new Scintilla LexCpp version and it seemed to work.
    Which bug cases of raw string parsing are still wrong?
    By the way, as a registered sourceforge user, you can provide patches to Scintilla at https://sourceforge.net/p/scintilla/feature-requests/
    However, would you mind merging your code also into the current 3.3.4 version of LexCPP and provide it here, so I could integrate it into a complete Scintilla update for Npp?
    FLS

     
  • Gur Stavi
    Gur Stavi
    2013-07-27

    Hello FLS,

    First let me stress that I don't use raw strings and don't know much about them. I only care about them because of false positives that prevents syntax highlighting in some files. An option to disable raw string detection altogether will be great and the correct step since 99% of C/C++ developers never use them. Is there a simple way for a user to send Scintilla options such as 'styling.within.preprocessor' from npp++. If so I may also add an option to disable raw string detection.

    Regarding what still wrong with scintilla. Based on Wikipedia raw string has the format: R"token( ... )token"
    The token is optional and (limited at 16 chars) but the '(' is not.
    SciTE still detects R" as the beginning of a raw string even without the '(' and allow any length of token.

    But admitably this is nit picking. Merging current Scintilla into npp++ will be good enough. My patch is not perfect too but since it does solve that corner case I will try merging it into latest LexCPP and post a patch at scintilla and also here.

    Thanks,
    Gur