Being able to highlight relevant code would be useful to have

Started by
3 comments, last by badu990 7 years, 1 month ago

Recently I was posting some code in a post, but I tried to highlight some part of the code to let the reader focus on, though it would be very helpful to have the rest of the code there so the reader could skim through to have an overview (and also to reference if needed).

Otherwise, not highlighting and thus making the reader read through both the more relevant and the less relevant parts of the code with the same intensity could be distracting, inefficient and could even discourage some to look through

So selecting a section, highlighting and choosing a text colour, say red should be alright? Well by the time I clicked post, I found the new text colour didn't stick. As much as I tried over again .... It didn't stick

So I'm thinking this kind of highlighting sections of code would be a useful and good feature to have and like to suggest adding it

Though i'm really sceptical this time... my previous post here was completely ignored, maybe my 9 lives at GDNet has ran-out :(

can't help being grumpy...

Just need to let some steam out, so my head doesn't explode...

Advertisement

my previous post here was completely ignored

Not ignored. Just busy. Also limiting changes to the current site as we prepare for an upgrade that will address most or all problems anyone might have.

For this particular one, syntax highlighting is going to override any color formatting in a code block by default so some special code will be needed. Wondering if there's a better way to identify specific lines in the code - or perhaps break the code block up into multiple sections? Again though, new code formatting/editor in the upgrade might improve this.

Admin for GameDev.net.

For this particular one, syntax highlighting is going to override any color formatting in a code block by default so some special code will be needed. Wondering if there's a better way to identify specific lines in the code - or perhaps break the code block up into multiple sections? Again though, new code formatting/editor in the upgrade might improve this.

Does the colour formatting include background colour, or just the foreground? On Allegro.cc, you append any lines of code you want to highlight with *** and it changes the background colour to yellow.

Not ignored. Just busy.
My apologies

can't help being grumpy...

Just need to let some steam out, so my head doesn't explode...

On Allegro.cc, you append any lines of code you want to highlight with *** and it changes the background colour to yellow.

Would be good to borrow (nick ) some of their source code :)

This topic is closed to new replies.

Advertisement