• Login
Community
  • Login

bug + question about comment highlighting

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
stylecomments
4 Posts 2 Posters 2.6k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N
    Nicolas-
    last edited by Jul 15, 2016, 9:20 AM

    Hello,

    I tried to define a user-defined language and I discovered a bug : when, in the tab “Comment&Number”, if the option “Force at beginning of line” is checked and the first line of the program starts with the comment line symbol, the line is not coloured as expected, but keeps the default colour.

    The second point is that I try to colour the comments. With the language I use, a comment is either preceded by space then a star or by anything, then a semi-colon then possibly some spaces then a star (actually, semi-colon are similar to new lines).

    Example :
    *comment
    code ; code
    code ; * comment
    var1 = var2 * 10

    So looking at the help page, I try to manage it with nested comment, but I never found how to manage it.

    Any help will be really appreciated!

    C 1 Reply Last reply Jul 16, 2016, 10:32 PM Reply Quote 0
    • C
      Claudia Frank @Nicolas-
      last edited by Claudia Frank Jul 16, 2016, 10:33 PM Jul 16, 2016, 10:32 PM

      @Nicolas-

      yes, first one looks like a bug and second one is, afaik, not possible as UDL wouldn’t treat the star a multiplier anymore.
      (well, if var2 * 10 means multiplicative in your language)

      Cheers
      Claudia

      1 Reply Last reply Reply Quote 0
      • N
        Nicolas-
        last edited by Nicolas- Jul 18, 2016, 1:53 PM Jul 18, 2016, 1:50 PM

        @Claudia-Frank
        Thank you very much for the answer.
        Yes, the star is both the comment symbol (if at the beginning of a line or after a semi-colon) and the multiplier symbol.

        I also tried to use regexp in the comments definition (using a the ;[\t ]*\* regexp), but it seems that comments definition doesn’t manage regexp. Isn’t it ?

        Cheers,

        C 1 Reply Last reply Jul 22, 2016, 12:03 AM Reply Quote 0
        • C
          Claudia Frank @Nicolas-
          last edited by Jul 22, 2016, 12:03 AM

          @Nicolas-

          Yes, unfortunately regex isn’t working.

          Cheers
          Claudia

          1 Reply Last reply Reply Quote 0
          3 out of 4
          • First post
            3/4
            Last post
          The Community of users of the Notepad++ text editor.
          Powered by NodeBB | Contributors