AI Zone Admin Forum Add your forum

NEWS: Chatbots.org survey on 3000 US and UK consumers shows it is time for chatbot integration in customer service!read more..

Code tags don’t work
 
 

Code tags don’t do what they are supposed to and mangle code.

Could you add or replace them with textarea tags?

 

 
  [ # 1 ]

Hi Merlin, I thought that code tags were working pretty well. Can you give me an example where it goes wrong?

What do you mean with replacing them with textarea tags?

 

 
  [ # 2 ]

I’ve seen people using this < code—-  > instead of [ code—-  ]  (added spaces and dashes to prevent it being interpreted)

so

dit is a <code> test

 

 
  [ # 3 ]
this is a [code] test 
 

 
  [ # 4 ]

aha, we only accept [ .. ] Does that help Merlin? We can obviously also read < .. >. A nice feature request, again grin

 

 
  [ # 5 ]

Reference this thread:
http://www.chatbots.org/ai_zone/viewthread/601/P15/

we were all working on flavors of a Sierpinski Triangle. Most people use other programming languages but I use HTML and Javascript.

I wanted to paste an entire function, and later an entire small HTML page example between the CODE blocks.

But the forum mangles the code, deleting backslashes, eliminating script tags and stripping some other pieces.

What I want is to paste code that someone can then copy and use. I almost did not post anything on that thread because of the problems, but Dave offered to help. But, he ran into the same issues that I did. So, we spent the next few hours trying to get it into a shape that someone could then copy and use.

You could use CODE in angle brackets or even a textarea. Again, the auto highlighting does not help much if the code ends up being stripped or wrong.

I sent an example to your email.

 

 
  login or register to react