4 Replies Latest reply on Jul 26, 2019 11:10 AM by Dude!

    one blank line represents two blank lines on Syntax Highlighting of SQL

    Quanwen Zhao

      Hey my guys and friends ,

       

      On ODC here I get accustomed to putting my SQL code to the area of Syntax Highlighting of SQL. Because if so, my code looks live very neat and tidy.

       

      I didn't notice it before, when the line numbers of my code become more in particular blank line. this time you'll find that my code has actually two number of blank lines on initial UE editor (UltraEdit), What a pity after I insert them to this Syntax Highlighting of SQL those blank lines' number will change.

       

      To be honest we can practice what my described previous, take a look at the following 3 number of screenshots in order,

       

      (1)

      (2)

      (3)

       

      This is real showing result after I posted this thread

       

      BBS@xxxx> set pagesize 50
      BBS@xxxx> 
      BBS@xxxx> select * from t;
      
      
              ID DT
      ---------- -------------------
               1 2019-07-26 11:00:00
               2 2019-07-26 11:02:00
               3 2019-07-26 11:04:00
               4 2019-07-26 11:06:00
               5 2019-07-26 11:08:00
               6 2019-07-26 11:10:00
               7 2019-07-26 11:12:00
               8 2019-07-26 11:14:00
               9 2019-07-26 11:16:00
              10 2019-07-26 11:18:00
              11 2019-07-26 11:20:00
              12 2019-07-26 11:22:00
              13 2019-07-26 11:24:00
              14 2019-07-26 11:26:00
              15 2019-07-26 11:28:00
              16 2019-07-26 11:30:00
      
      
      16 rows selected.
      

       

      Could you anyone notice this strange phenomenon?

       

      Best Regards

      Quanwen Zhao

        • 1. Re: one blank line represents two blank lines on Syntax Highlighting of SQL
          BluShadow

          First rule of the community.  Always search first to see if it's been raised before.

           

          List of forum editor issues and bugs

          • 2. Re: one blank line represents two blank lines on Syntax Highlighting of SQL
            Quanwen Zhao

            By the way my 3rd screenshot above has been captured by me when I just inserted original SQL code to the Syntax Highlighting area of SQL. As you can see it only shows totally 22 number of lines.

             

            In fact after I posted it to make you see in public, you might notice that my SQL code has totally 26 lines. In other words my initial one blank line now becomes really two blank lines from my UE moving to Syntax Highlighting area of SQL.

             

            Furthermore when sliding my mouse on my 3rd screenshot previous, which is also different from what I see.

             

            I hope Admin(s) are able to fix this issue as soon as possible.

             

            Best Regards

            Quanwen Zhao

            • 3. Re: one blank line represents two blank lines on Syntax Highlighting of SQL
              BluShadow

              It's unlikely to be fixed anytime soon.  Jive, who provide the platform don't seem to be in any hurry to fix things.

               

              Just do what most people do, avoid using the flawed syntax highlighting and instead, just past your code, highlight it and change the font to something like Courier New so it's a fixed width font, and then, for tidiness use the >> button and Quote option to put the code in a quote box.  That also prevents all the other issues from the Syntax highlighting, such as when other people copy your code in to their editor and have all the syntax highlighting line numbers included that they then have to remove before they can execute the code.

              • 4. Re: one blank line represents two blank lines on Syntax Highlighting of SQL
                Dude!

                Many of these and similar issues depend on what kind of browser you use. You will find different results when using different browsers, like Safari and Firefox, for example.

                 

                Syntax Highlighting eliminates white space, which it shouldn't. However if you don't use it, people will get double spaced lines when using copy and paste. So either way, it's useless. Selecting text and changing the font, like courier, also does not work reliably and produces different results depending on your browser.

                 

                I don't use syntax highlighting and find it completely unusable. I cannot edit text in SH and what I see is never what I get. You can avoid the double spaced lines when you copy and paste normal text by replacing Returns with Shift-Returns. The later however can be very inconvenient.

                 

                You will have to experiment to find out what works best for you, but then again, people will have different results when they use a different browser.