jesirose
Member
Posted 5 years ago #
I have not been able to find a code-preservation plugin that actually preserves indentation. I have tried:
"Code Viewer" - couldn't get it to show anything, and I don't want to use external files if at all possible.
"Dean's Code Hightlighter" - didn't preserve indentation.
"Preserve Code Formating" - Doesn't preserve indentation!
http://blog.grady.us/2007/01/08/code-test/
Here is a test post I did using the last one (which hasn't been updated since March 2005 so I think it's outdated) The middle two lines should be indented.
Are there any which will keep my indentation using either multiple spaces or tabs?
Any help would be greatly appreciated.
jesirose
Member
Posted 5 years ago #
http://blog.grady.us/2007/01/08/code/
Still didn't indent....What do I have to do? I tried Tab and hitting space 5 times....
*sob* This is really frustrating me :(
i might sound a bit dumb here... won't pre html tag work for ya? :P
jesirose
Member
Posted 5 years ago #
I tried that first, and it still strips the extra spaces.
Maybe I need to go into the actual wordpress code and find out where it's removing my spaces. :(
Edit: I added it again, see:
http://blog.grady.us/2007/01/08/code/
It looks fine, but it's not indented. I don't care about highlighting, numbered lines, whatever, I just want tabs and spaces.
Thanks so much guys for reading and helping :)
u mean to say PRE tag is not keeping your blank spaces? it always work for me :P
you can try formating the PRE tag using css to make it look similar to other content of the site. nasty way... might work for ya!
i think PRE tag is some what considered evil or depreciated... not sure.
I dunno. You're using the non-WYSIWYG editor, right?
Here's an example of mine using the plugin I mentioned: http://www.solo-technology.com/blog/2006/01/08/the-obligatory-my-ajax-tutorial-post/
You'll see several code fragments, all with indenting. I didn't jump through any hoops.
jesirose
Member
Posted 5 years ago #
Sushuhb - that is exactly what I am saying...It's freaking me out
Handy - I go into Write and start a new post. I tried just putting it in the editor, and I tried clicking the HTML button. But then it does go back to the rich text editor - is that why it's not saving the spaces?
I unclicked to use the rich text editor by default, and it still shows the WYSIWYG.
jesirose
Member
Posted 5 years ago #
AHA! I found out how to turn off the editor for myself, and the plugin you suggested indented my code now!
Thank you thank you Thank you thank you!
Excellent, glad to hear it. :-)