Support » Plugin: Crayon Syntax Highlighter » [Plugin: Crayon Syntax Highlighter] Crayon Objective-c not working as it should

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author akarmenia

    (@akarmenia)

    Could you post the HTML post text?

    Hi akarmenia, After testing a bit more on this it seems like it is not connected to objc specifically. Actually I am having problems telling when the error occurs. Right now most of the times it works… I had problems mostly when previewing the post when editing.

    I know this doesn’t say much. I am going to continue trying and I will post any updates here if I can find a pattern for the problem!

    Btw, great plugin I love it! Keep up the good work 🙂

    I found another problem that might be of interest to you as well:

    Using crayon like this:
    <pre class=”lang:objc decode:true ” >@interface ViewController : UIViewController <UIWebViewDelegate>

    Results in this after saving:
    <pre class=”lang:objc decode:true ” >@interface ViewController : UIViewController <uiwebviewdelegate></uiwebviewdelegate>

    Seems to think that uiwebviewdelegate is a html tag and closes it.
    Any ideas why? Or how to solve this?

    Plugin Author akarmenia

    (@akarmenia)

    Thanks for your support, glad you like it. Did you close the pre afterwards? I imagine so, and I think that’s caused by TinyMCE treating that protocol as an HTML tag. You can prevent that by using the HTML editor after creating the Crayon, but I’ll look into it.

    Plugin Author akarmenia

    (@akarmenia)

    You should not use the “<” character inside the pre, since it will be an actual XHTML element. The Tag Editor should create them as “& amp;lt;” and then decode it when printing it on the web page.

    I am actually using the “<” character!

    When I tried it on a new post that I created it worked, but when I try to do it to an old post I still get the problem mentioned above.

    Plugin Author akarmenia

    (@akarmenia)

    All angular brackets should be encoded as html entities in the Crayon, and the decode:true option must be used to decode them before highlighting. You shouldn’t have a decoded angular bracket in the code, because it will treat it as an HTML tag:

    Good:
    https://dl.dropbox.com/u/33811812/Crayon/support/ang1.png

    Bad:
    https://dl.dropbox.com/u/33811812/Crayon/support/ang2.png

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[Plugin: Crayon Syntax Highlighter] Crayon Objective-c not working as it should’ is closed to new replies.