March 17, 2009 at 11:12 am
New code formatting has been released on SSC. Please feel free to check it out and comment.
Use the [ code ][ /code ] shortcuts to the right for enclosing code items.
March 17, 2009 at 11:18 am
It seems to be dropping blank lines in the format. Maybe I'm doing something wrong, but it seems to be doing so.
Line one, followed by a blank line
Line two
That has a blank line between the two, in the edit screen. Makes it a bit harder to view longer code pieces.
I like the line-wrap though! Very cool! No more left-right scroll because someone had a piece of code 10000-characters wide!
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
March 17, 2009 at 12:15 pm
I really loved the colored output:-D, it makes real easy to read the code. But there seems to be some problem with the text "ADD" as it adds itself twice to the output (i.e. "ADDADD" is being shown, 1 with blue color and other with pink color).
ALTER TABLE [dbo].[type_of_fraud]
ADD [matchfile_autoload] char(01) NOT NULL
CONSTRAINT DF_No_matchfile_autoload DEFAULT('N')
Edit:
And also, it would be better if you can make the font size same as the normal text.
--Ramesh
March 17, 2009 at 1:20 pm
March 17, 2009 at 1:35 pm
Definitely an improvement. I haven't seen the issues mentioned yet though. This has been a light day for me posting code. I've mainly added links.
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
March 18, 2009 at 6:16 am
While I like the color highlighting and wordwrap, there's something distinctly odd with it.
I use IE6 (Company Policy) and the code backgroup tends to come out as random gray/white horizontal stripes, occasionally solid gray (which is what I suspect it should be.
Also when I looked at my recent posts page, I get some very odd behaviour. It looks like the code blocks are overlaid all over the messages. See attached partial screenshot.
Derek
March 18, 2009 at 7:10 am
Another (minor) thing is that it seems to ignore "nvarchar". "Varchar" ends up blue, but "nvarchar" ends up black.
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
March 18, 2009 at 8:30 am
Steve Jones - Editor (3/17/2009)
New code formatting has been released on SSC.
Ooooohhhh..... Nice!
Jack Corbett (3/17/2009)
This has been a light day for me posting code. I've mainly added links.
I don't think I've posted any code this week yet.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
March 18, 2009 at 8:44 am
seems to hate less-than and greater-than symbols:
this line has the ampersand-LT-semicolon:
salesMonth <=@month and YTD = 0 OR salesMonth = @month and YTD <> 0
this is as you'd type it
salesMonth 0
strips the middle portion of the code out assuming an HTML tag.
Lowell
March 18, 2009 at 8:45 am
Thanks for the notes. I'm logging some bugs.
- The ADDADD thing, we had that with some other keywords and cleaned them up. We missed this one.
- Blank lines, noted
- background - We have code tags, it's possible some are missing. If that's the case, you'd get the solid gray. Other code items are made with the alternating greenbar type formatting of white and light gray. We can make it solid.
- Font size, noted. Not sure if I want it the same or smaller to stand out.
March 18, 2009 at 8:47 am
GilaMonster (3/18/2009)
Steve Jones - Editor (3/17/2009)
New code formatting has been released on SSC.Ooooohhhh..... Nice!
Jack Corbett (3/17/2009)
This has been a light day for me posting code. I've mainly added links.I don't think I've posted any code this week yet.
If you look, you'll find that all existing code is now being displayed with color highlighting...
I wonder if that's broken anything? I think I may have used a construct like
[ c o d e ] ..... ; [ b ] [ / b ] ) ... [ / c o d e ]
and relied on the bold tag getting hidden! I will have to go look...
Derek
March 18, 2009 at 8:55 am
I think the string and comment handling needs a little more work
http://www.sqlservercentral.com/Forums/FindPost678555.aspx
--here's a single quote within a comment
select 'String 1', 012
select 'String 3', 789 -- that's not what I wanted to see
select 'String 5', 456 -- that's better
select 'String 7', 123 -- not quite
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
March 18, 2009 at 9:09 am
Bob posted some code here. Bob's code looks OK, but I think the formatter saw a single quote in the comment and hence was thown out of phase.
-- based on what we've seen
insert #t
select 'this is how' union all
select 'we insert data' union all
select 'for testing'
declare @i int
-- wouldn't it be nice to insert arrays so you didn't need to do union all
set @i = 1
select k as 'kay'
/*
block comments aren't right either
what happens if I insert one
*/
select j as 'jay'
Basically, it looks like the scanner is recognizing single quotes in comments and hence getting confused. I've attache a screenshot previewing the above rather than try to describe it.
Derek
March 18, 2009 at 9:13 am
i noticed if i add an 800 line block, it'll show all 800 lines; i'd rather have a scrollbar for the code in question, if possible.
Lowell
March 18, 2009 at 9:14 am
Copying and pasting code from the forum, the code becomes double spaced and it loses it formatting (indention for one).
Viewing 15 posts - 1 through 15 (of 42 total)
You must be logged in to reply to this topic. Login to reply