[code] [/code]

how to write inactive code tags

Page 1 of 1

13 Replies - 1150 Views - Last Post: 17 November 2010 - 01:19 PM

#1 Dormilich  Icon User is online

  • 痛覚残留
  • member icon

Reputation: 3541
  • View blog
  • Posts: 10,229
  • Joined: 08-June 10

[code] [/code]

Posted 17 November 2010 - 07:12 AM

recently the need to show people how to use [code] [/code] tags has IMO dramatically increased, thus I’d like to share a method how to write them as demo.

the idea is simple, escape one of the brackets by entities: [code] [/code] ([ = U+005B = [, ] = U+005D = ])

of course you can write/escape any character you like by that … :Þ

PS. bear in mind that the escaping does not persist in editing, the editor will then show the character you had escaped, thus you have to re-escape it.

This post has been edited by Dormilich: 17 November 2010 - 07:14 AM


Is This A Good Question/Topic? 0
  • +

Replies To: [code] [/code]

#2 lordofduct  Icon User is offline

  • I'm a cheeseburger
  • member icon


Reputation: 2533
  • View blog
  • Posts: 4,633
  • Joined: 24-September 10

Re: [code] [/code]

Posted 17 November 2010 - 07:14 AM

...

This post has been edited by lordofduct: 17 November 2010 - 07:15 AM

Was This Post Helpful? 0
  • +
  • -

#3 creativecoding  Icon User is offline

  • Hash != Encryption
  • member icon


Reputation: 926
  • View blog
  • Posts: 3,205
  • Joined: 19-January 10

Re: [code] [/code]

Posted 17 November 2010 - 07:36 AM

amidoingitright?

[code]

// Your code here

[/code]

EDIT:

That's pretty cool!

This post has been edited by creativecoding: 17 November 2010 - 07:37 AM

Was This Post Helpful? 0
  • +
  • -

#4 eclipsed4utoo  Icon User is offline

  • Not Your Ordinary Programmer
  • member icon

Reputation: 1524
  • View blog
  • Posts: 5,960
  • Joined: 21-March 08

Re: [code] [/code]

Posted 17 November 2010 - 07:49 AM

or just use this...

:code:

by typing ": code :" without the spaces and quotations
Was This Post Helpful? 0
  • +
  • -

#5 Dormilich  Icon User is online

  • 痛覚残留
  • member icon

Reputation: 3541
  • View blog
  • Posts: 10,229
  • Joined: 08-June 10

Re: [code] [/code]

Posted 17 November 2010 - 07:58 AM

View Posteclipsed4utoo, on 17 November 2010 - 02:49 PM, said:

by typing ": code :" without the spaces and quotations

like that: :code: ?

pretty ugly font style, though …

This post has been edited by Dormilich: 17 November 2010 - 07:59 AM

Was This Post Helpful? 0
  • +
  • -

#6 eclipsed4utoo  Icon User is offline

  • Not Your Ordinary Programmer
  • member icon

Reputation: 1524
  • View blog
  • Posts: 5,960
  • Joined: 21-March 08

Re: [code] [/code]

Posted 17 November 2010 - 08:04 AM

It gets the job done. To me, 6 keystrokes is better than keeping that string of characters laying around for me to copy and paste when I need it.
Was This Post Helpful? 0
  • +
  • -

#7 Alex6788  Icon User is offline

  • kitties == adorable


Reputation: 144
  • View blog
  • Posts: 1,667
  • Joined: 15-July 10

Re: [code] [/code]

Posted 17 November 2010 - 08:11 AM

View Posteclipsed4utoo, on 17 November 2010 - 08:49 AM, said:

or just use this...

:code:

by typing ": code :" without the spaces and quotations

I was going to say that.

I like Dormilich's idea though, not sure how you came up with it ha ha.
Was This Post Helpful? 0
  • +
  • -

#8 Dormilich  Icon User is online

  • 痛覚残留
  • member icon

Reputation: 3541
  • View blog
  • Posts: 10,229
  • Joined: 08-June 10

Re: [code] [/code]

Posted 17 November 2010 - 09:05 AM

I prefer the autofill function of my browser in the reason field, that’s one key stroke and one mouse click.
Was This Post Helpful? 0
  • +
  • -

#9 eclipsed4utoo  Icon User is offline

  • Not Your Ordinary Programmer
  • member icon

Reputation: 1524
  • View blog
  • Posts: 5,960
  • Joined: 21-March 08

Re: [code] [/code]

Posted 17 November 2010 - 09:41 AM

if you are doing it in the "Edit Reason" when editing a post, then you don't need to escape the code tags. Code tags in that field don't get processed by the syntax highlighter.
Was This Post Helpful? 0
  • +
  • -

#10 Christoph  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 233
  • View blog
  • Posts: 1,559
  • Joined: 23-August 09

Re: [code] [/code]

Posted 17 November 2010 - 09:58 AM

Hey as long as I can re-escape after I've escaped we're straight.

I think.
Was This Post Helpful? 0
  • +
  • -

#11 dorknexus  Icon User is offline

  • or something bad...real bad.
  • member icon

Reputation: 1256
  • View blog
  • Posts: 4,618
  • Joined: 02-May 04

Re: [code] [/code]

Posted 17 November 2010 - 11:47 AM

don't kid yourself gay guy.
Was This Post Helpful? 0
  • +
  • -

#12 JackOfAllTrades  Icon User is offline

  • Saucy!
  • member icon

Reputation: 6063
  • View blog
  • Posts: 23,515
  • Joined: 23-August 08

Re: [code] [/code]

Posted 17 November 2010 - 11:50 AM

We need to add more to the output of the code tags macro, like maybe the screenshot/thumbnail from this pinned post in the PHP forum.
Was This Post Helpful? 0
  • +
  • -

#13 NeoTifa  Icon User is offline

  • Whorediot
  • member icon





Reputation: 2670
  • View blog
  • Posts: 15,712
  • Joined: 24-September 08

Re: [code] [/code]

Posted 17 November 2010 - 12:56 PM

Why do you call everyone gay guy, slut face?
Was This Post Helpful? 0
  • +
  • -

#14 Christoph  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 233
  • View blog
  • Posts: 1,559
  • Joined: 23-August 09

Re: [code] [/code]

Posted 17 November 2010 - 01:19 PM

View PostNeoTifa, on 17 November 2010 - 06:56 PM, said:

Why do you call everyone gay guy, slut face?

It's a curse, I get hit on by all the gay men but they try to play it straight by calling me out.

HA!

Jokes on us Dark_Nexus!
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1