Loading ...
Sorry, an error occurred while loading the content.
 

syntax colouring - comments /* -- ---- */ and // -------

Expand Messages
  • sn0wdon
    For an xml file format with embedded javascript, I can t get some comments to be coloured .. Here is an extract from the customfile.stx used ..
    Message 1 of 8 , Sep 24, 2005
      For an xml file format with embedded javascript, I can't get some
      comments to be coloured ..

      Here is an extract from the customfile.stx used ..

      ______________________________

      #DELIMITER=<>/="'%,.(){}[]-+*~&|;
      #CASE=y
      #SPECIAL_STX=html
      #QUOTATION1='
      #QUOTATION2="
      #LINECOMMENT=//
      #LINECOMMENT2=#
      #COMMENTON=/*
      #COMMENTOFF=*/
      #COMMENTON1=<!--
      #COMMENTOFF1=-->
      #COMMENTON2=<?ignore
      #COMMENTOFF2=?>
      #COMMENTON3=//
      #COMMENTOFF3=\n
      #ESCAPE=\
      #SCRIPT_BEGIN=<![CDATA[
      #SCRIPT_END=]]>

      ______________________________


      These start and end tags refuse to be coloured .. as in javascript

      in fact it seems any including forward slash /

      /*
      .. code to be commented ..
      */

      // .. code to be commented ..


      Any clues?
    • sn0wdon
      Any possible reason why block comment does not syntax colour in a customised stx file for XML? /* comments to be syntax coloured */ or .. // comments to be
      Message 2 of 8 , Sep 26, 2005
        Any possible reason why block comment does not syntax colour in a
        customised stx file for XML?

        /*
        comments to be syntax coloured
        */

        or ..

        // comments to be syntax coloured

        ...

        Block comments are coloured o.k. in php .. just not in XML format.
      • Michael L. Jones
        Since in works in one file, but not the other, it seems that some other entry in the second file must be the source of the problem. I d try removing everything
        Message 3 of 8 , Sep 27, 2005
          Since in works in one file, but not the other, it seems that some
          other entry in the second file must be the source of the problem. I'd
          try removing everything else from the second file, and, assuming that
          the comments are highlighted correctly, begin adding stuff back in
          until it breaks.

          --- In editplus@yahoogroups.com, "sn0wdon" <dl.lists@n...> wrote:
          > Any possible reason why block comment does not syntax colour in a
          > customised stx file for XML?
          >
          > /*
          > comments to be syntax coloured
          > */
          >
          > or ..
          >
          > // comments to be syntax coloured
          >
          > ...
          >
          > Block comments are coloured o.k. in php .. just not in XML format.
        • sn0wdon
          ... that ... Good advice .. so I started with this basic stx file ______________________________ #TITLE=testfile #DELIMITER=,(){}[]-+*%/= ~!&| ?:;.#@
          Message 4 of 8 , Sep 27, 2005
            --- In editplus@yahoogroups.com, "Michael L. Jones"
            <mljones1947@y...> wrote:
            >
            > try removing everything else from the second file, and, assuming
            that
            > the comments are highlighted correctly, begin adding stuff back in
            > until it breaks.
            >
            Good advice .. so I started with this basic stx file
            ______________________________

            #TITLE=testfile

            #DELIMITER=,(){}[]-+*%/="'~!&|<>?:;.#@
            #LINECOMMENT=//
            #COMMENTON=/*
            #COMMENTOFF=*/

            #
            ______________________________

            This syntax colours line comments and block comments

            but all text including and after // in urls (e.g.
            http://www.google.com) is also syntax coloured as a comment!

            How can LINECOMMENT be forced to start only at beginning of line
            (ignoring http://)?

            I tried #LINECOMMENT=\n//

            but that does not work.
          • sn0wdon
            Further observation ... adding these lines causes the block comment /* --- */ to break .. ______________________ COMMENTON1=
            Message 5 of 8 , Sep 27, 2005
              Further observation ...

              adding these lines causes the block comment /* --- */ to break ..

              ______________________

              COMMENTON1=<!--
              COMMENTOFF1=-->
              ______________________
            • Michael L. Jones
              This works for me (2 instead of 1): #COMMENTON2=
              Message 6 of 8 , Sep 28, 2005
                This works for me (2 instead of 1):

                #COMMENTON2=<!--
                #COMMENTOFF2=-->

                --- In editplus@yahoogroups.com, "sn0wdon" <dl.lists@n...> wrote:
                > Further observation ...
                >
                > adding these lines causes the block comment /* --- */ to break ..
                >
                > ______________________
                >
                > COMMENTON1=<!--
                > COMMENTOFF1=-->
                > ______________________
              • Michael L. Jones
                Try #LINECOMMENT=^!// Check out http://www.editplus.info/wiki/Syntax_file_format
                Message 7 of 8 , Sep 28, 2005
                  Try

                  #LINECOMMENT=^!//

                  Check out http://www.editplus.info/wiki/Syntax_file_format

                  --- In editplus@yahoogroups.com, "sn0wdon" <dl.lists@n...> wrote:
                  > Good advice .. so I started with this basic stx file
                  > ______________________________
                  >
                  > #TITLE=testfile
                  >
                  > #DELIMITER=,(){}[]-+*%/="'~!&|<>?:;.#@
                  > #LINECOMMENT=//
                  > #COMMENTON=/*
                  > #COMMENTOFF=*/
                  >
                  > #
                  > ______________________________
                  >
                  > This syntax colours line comments and block comments
                  >
                  > but all text including and after // in urls (e.g.
                  > http://www.google.com) is also syntax coloured as a comment!
                  >
                  > How can LINECOMMENT be forced to start only at beginning of line
                  > (ignoring http://)?
                  >
                  > I tried #LINECOMMENT=\n//
                  >
                  > but that does not work.
                • sn0wdon
                  ... Those last two suggestions have solved my problem with comments. Thanks. Now I will start adding back the keywords.
                  Message 8 of 8 , Sep 28, 2005
                    > Try
                    >
                    > #LINECOMMENT=^!//
                    >
                    > #COMMENTON1=<!--
                    > #COMMENTOFF2=-->
                    >

                    Those last two suggestions have solved my problem with comments. Thanks.
                    Now I will start adding back the keywords.
                  Your message has been successfully submitted and would be delivered to recipients shortly.