Skip to content

CodeQuote

Update: 2009-03-31: I am no longer working on this plugin. I suggest you use a different plugin for including code in your posts.

Update 2008-01-17: I found a bug that breaks the display of code in certain situations, such that the close code tag never kicks in. Silly, I know. I’m going to work on this on Thursday afternoon.

When you enter text on a WordPress blog, quotation marks and apostrophes are displayed as smart quotes, also known as curly quotes, and sometimes as fancy quotes. But if you are including html or other programming code on your page, when someone copies and pastes the code, they end up with a mess since most programming interpreters don’t like smart quotes. CodeQuote disables smart quotes within <code> and </code> blocks.

Example (Regular Text)
Michael Clark said “Hello, World! It’s a wonderful day, isn’t it?”

Example (in a <code> block)


Michael Clark said "Hello, World! It's a wonderful day, isn't it?"

The open and close code tag must be on a line by itself!

This plugin does not modify the database or any system settings. I have tested CodeQuote only on WordPress version 2.3.2.

Installation

  1. Download CodeQuote to the plugins directory under wp-content of your blog.
  2. Unzip the codequote.zip file.
  3. Activate the plugin on your plugins page.
  4. (Optional) I suggest you subscribe to my RSS feed so you can stay informed about any updates to CodeQuote.

Uninstall

  1. Deactivate the plugin on your plugins page.
  2. Delete codequote.php from your plugins directory, under wp-content of your blog directory.

If you discover any problems, or have any suggestions on improving CodeQuote, please contact me.

Payment

Using CodeQuote is free, you do not have to pay me anything. If you find it useful, and you’d like to pay me, any (or all!) of the following would be greatly appreciated:

History

  • January 7, 2008: Initial release (version 0.93). I found another bug (feature!) based on a blank line on the line before the open code command.
  • January 7, 2008: Initial release (version 0.92). I think I fixed the case when you have a < inside your code block.
  • January 7, 2008: Very initial release (version 0.91). Fixed a silly typo, cleaned up logic a bit. Found a bug still working on regarding < symbols.
  • January 7, 2008: Very initial release (version 0.9).

Leave a Reply