Community
    • Login

    bug + question about comment highlighting

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    stylecomments
    4 Posts 2 Posters 2.5k 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.
    • Nicolas-N
      Nicolas-
      last edited by

      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!

      Claudia FrankC 1 Reply Last reply Reply Quote 0
      • Claudia FrankC
        Claudia Frank @Nicolas-
        last edited by Claudia Frank

        @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
        • Nicolas-N
          Nicolas-
          last edited by Nicolas-

          @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,

          Claudia FrankC 1 Reply Last reply Reply Quote 0
          • Claudia FrankC
            Claudia Frank @Nicolas-
            last edited by

            @Nicolas-

            Yes, unfortunately regex isn’t working.

            Cheers
            Claudia

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