syntax highlighting and marsedit
  • I'm hoping there is a simple setting I can change to fix this...

    I'm using MarsEdit (v3.3.1) to publish to a Wordpress (v3.2.1) blog using SyntaxHighlighter (SyntaxHighlighter Evolved v3.1.3)

    When I create post that has embedded code and save it locally, the preview in Mars Edit doesn't look how it will on the web, but that's OK - as I can still edit the code in HTML view. It will be formatted correctly by the server. For example, here's a post with code, I've saved locally, then pushed to the server, and everything looked fine:
    http://cl.ly/372K0v1C3p381j1G0L0P

    Unfortunately, if I want to round-trip the post, and edit it from Marsedit after it's been published, many of the syntax characters get escaped when I open the entry to edit:
    http://cl.ly/0s2x0W2F1B0K0q1D0S13

    Which means I can't round trip an entry. I saw a previous post on the form that required newer versions of php and libxml2 (of which I'm running new versions, 5.3.7 and 2.7.8 respectively...)

    Any idea what's causing this?

    Thanks in advance,
    Dan
  • Sorry you are running into this. It sounds familiar, and like a situation I researched with WordPress a while back. I reported a bug about a situation where essentially plugins like Syntax Highlighter have their "escape" functions called too many times:

    http://core.trac.wordpress.org/ticket/12939

    In a nutshell, the bug is on WordPress's end but it looks like the issue has lost momentum for a fix. Unfortunately I don't know of any easy workaround for this.

    Daniel
  • Have you tried using the <pre> tags instead of [sourcecode] blocks? SyntaxHighlighter Evolved can color those too.
Start a New Discussion

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!