SQLTeam.com | Weblogs | Forums

We are experimenting with code highlighting


#1

If you post formatted code, it should not do some basic formatting on it. You can see the original discussion that prompted this at Discourse Annoyances.


#2

"it should now do some basic formatting on it" ??

Test of a block of code surrounded by [code] ... [/code] BBCode tags

SELECT * FROM MyTable WHERE FOO =  'BAR'

Test of a block of code pasted in and then selected and then press Control-K or the [</>] button (which basically prefixes each line with 4-spaces:

SELECT *
FROM MyTable
WHERE FOO =  'BAR'

Both seem to work well, thanks @graz :smile:


#3

Please to say that the change appears to be retrospective so code blocks on older threads are showing as colour-coded :smile: This was the earliest thread I found with a code block, from 10-May