Code tags not working
-
Hi,
I’m trying to use code tags, as specified in the docs here:
http://en.support.wordpress.com/code/posting-source-code/Here is my blog post:
http://justsomedev.wordpress.com/2011/06/14/jsonp-in-user-scripts-with-chrome/As you can see, it’s not adding any line numbers or syntax highlighting. Any ideas why this might be?
testing code tags in this post
The blog I need help with is: (visible only to logged in users)
-
The support document is seriously in need of a edit and bug fixing pass by staff since it is not only mucked up (not showing the example code) but also about as clear as mud since they have given few real-life examples.
Contact staff directly on this and point them at the less-than-helpful support document.
-
-
instead of starting another thread:
I can’t get
code (code inside) /codeto work properly either.
is stripped out, when between the “code” tag.
and WordPress.com Shortcode isn’t working at all between the “code” tagThis is the page i’m making, sort of a shorthand reminder for myself on my testing blog. I had to switch to editor mode to some of the code.
-
It all seems to be seriously broken and the home page for the highlighter that wordpress is using is just as useless as the support document here.
I can’t believe that the support page made it out of the barn.
-
It seems to strip out semicolons sometimes, but not all the time.
I don’t have the
< >
symbols on my page, that deliberate,but when either in shortcode or after the defining height and width code for an image its strips out semicolons…
…just reporting my experience for those who fix the bugs.
-
-
-
I’ve sent a support request about the syntax highlighting and line numbers not working. I’ll let you know what comes back.
-
Great. I’ve also mentioned to staff that the support page needs some lovin’ in the way of some examples of proper use of the code tag and how to specify the attributes. I checked out the plugin author’s page thinking perhaps they had some examples, but they do not either.
-
well the line numbers work.
Don’t use the “Code” tag instead
[sourcecode] body [/sourcecode]forsey85, I cannot figure out how to use the highlight command,and thesacredpath is correct, they need to make a new support page.
-
its just dummy code I copy/pasted…
However the code I mentioned that was stripped out with the “Code” tag is not stripped out with the “sourcecode” shortcode. -
Ah nice one dlager thanks. I was using HTML tag style angle brackets. With sourcecode in square brackers and a language parameter it seems to work:
[sourcecode language="javascript"][/sourcecode]
-
WordPress Support have updated the documentation:
http://en.support.wordpress.com/code/posting-source-code/ -
Which theme supports [sourcecode] tag? I can’t get it to work with default theme.
Thanks -
@violoncello2003 not sure what theme I was using (I’ve deleted my blog now). Are you using square brackets and typing them into the HTML editor view? The WYSIWYG editor view probably escapes them.
- The topic ‘Code tags not working’ is closed to new replies.