Showdown, iG:Syntax Hiliter v2.0 Final!!

Leave a Reply

Comment as a guest.

  1. Actually, I’m not sure what’s happening here – it seems that syntax highlighted blocks end up closing an extra two <div>s (do an edit->view source to see what I mean). Is this your plugin doing this? As you can see, the font sizes seem to change dramatically for some reason…

    And I see there’s an error with multiline strings, but I’m guessing that’s a geshi error that could be solved if I enable_classes()’d the code.

  2. it seems that syntax highlighted blocks end up closing an extra two <div>s……Is this your plugin doing this?

    Yes, its my plugin doing this & its not closing any extra DIVs. Its closing the 2 DIVs which it opened. Actually I was trying one more feature & that’s why I wrapped the CODE in an extra DIV. Its a kind of placeholder for that feature which I’ll probably be able to sort out for next version. The code is valid, no need to worry about it. πŸ˜€

    As you can see, the font sizes seem to change dramatically for some reasonÒ€¦

    Where? Oh!! you mean the font size that has gone so small after the first code box? I don’t see why that has happened, as nothing of the sort has happened with me. You can see my other posts where I’ve used this plugin & they appear alright, like this one.
    Also, I haven’t heard this problem from anyone else. Maybe you should lookup the CSS or something. I’ll see if I can get this problem on my test blogs. πŸ˜‰

    And I see thereÒ€ℒs an error with multiline strings

    What error? πŸ˜•

    thatÒ€ℒs a geshi error that could be solved if I enable_classes()Ò€ℒd the code

    That won’t work. πŸ™ I tried using enable_classes() & output the classes at runtime to the head section but there’s some problem, WP is not allowing the classes to be outputted. πŸ™

  3. Yes, its my plugin doing this & its not closing any extra DIVs. Its closing the 2 DIVs which it opened.

    Hmm, I’ll check my CSS then, though I can’t see what’s happening… I’m not too familiar with wordpress.

    And the font sizes change because it’s in an ol (-10%) and then in an li (-10% + 200% line height) – I just changed the stylesheet to make it look much nicer :). I used ol[start=””] to do it, but since I’ve banned internet explorer from my blog I’m not worried about compatibility πŸ˜‰

    Oh, and the multiline string thing *was* a geshi error – I’ve fixed it for the 1.0.3 release, due out today if I can get it out in time.

  4. IÒ€ℒve banned internet explorer from my blog

    Well, that’s the most unpleasant thing you’ve done till date in my knowledge. πŸ‘Ώ I use IE extensively & so do most of the people. And the message you display to IE users just suck. That’s not a nice way. It means you are doing a kind of cheap publicity for FireFox. Also, you shouldn’t tell your visitors what browser should they use. Its their choice & they get what they use. If they use IE & your website doesn’t support IE, then they’ll get a broken website & you can display a message that if they are not able to view the website correctly, then they should get FireFox. That’s the pleasant way of doing it.
    But blocking out IE users totally is just un-ethical. πŸ™ WordPress renders all well in IE, so what’s you got against it? πŸ˜•

    Oh, and the multiline string thing *was* a geshi error – IÒ€ℒve fixed it for the 1.0.3 release, due out today if I can get it out in time.

    What was that error, I didn’t spot it!! I’ll try & plug the latest version in the next iG:Syntax Hiliter quickly. πŸ˜€ πŸ˜‰

  5. Yeah, well I don’t care that IE users see what they see. It’s my blog, and I’ll do with it what I please.

    I don’t give a monkeys if they think it’s unpleasent, or get all offended.

    But, and I have asked this to many people, with no answer: would it be better if I change the links on the page to browsehappy.com instead of spreadfirefox.com?

  6. Yeah, well I donÒ€ℒt care that IE users see what they see. ItÒ€ℒs my blog, and IÒ€ℒll do with it what I please.

    Err, right.

    would it be better if I change the links on the page to browsehappy.com instead of spreadfirefox.com?

    Changing the links to Browserhappy would be better as it means that people are given a choice, they can get any of the so called safe browsers. But I’d say, from some of the reasons for switching I’ve read, most of them are just stupid reasons that they changed to FireFox from IE as FireFox is free & its nice!! I mean when I last heard, IE was still free. πŸ™„ And they could’ve explained more on what they found nice about FireFox that they didn’t find in IE, instead of ranting about who they are & what they do. πŸ™„ They seemed to think that they were giving some kind of personal interview where their identity is dominant.

  7. IE is free cos nobody with a brain would actually pay for it πŸ˜‰

    Anyway, I’ve changed the links now. That should shut them up at spreadfirefox.com as well ;).

  8. IE is free cos nobody with a brain would actually pay for it

    Now now, that’s just the opinion of a few narrow minded persons & you. Browsers for which users have to pay to use, like Opera, don’t have a bigger following as starting from Netscape & Mozilla back in the starting of WWW, people have taken browsers for free, so why should they pay for something when better alternatives are available for free? And don’t forget that IE was there before FireFox was even a blueprint.
    Also, IE has contributed to the Internet revolution more than any other browser or you wouldn’t be seeing all those Flash animations in your FireFox.
    The last version, IE6 came out 4 years back, so if you are gonna compare that with the latest version of the rival browser, its not gonna be fair. FireFox is being developed everyday, while IE is not, so there are gonna be quite a lot of differences.
    But I’m glad that the work on IE7 has started & we’ll soon see what Micosoft dishes out next with Longhorn.

    And, please, don’t turn this post in another Bad IE Good FireFox discussion. I use both IE & FireFox and I don’t care. I have uses for both. If you have anything to say against IE, this is certainly not the best place.

  9. With regard to that IE trap: I ran into it and I’m not using IE at all. I’m using Galeon (Mozilla based Gnome browser) which just fakes its identity to get past those silly browser detection scripts that just know about two or three browsers and keep you out if you use a browser they don’t know.

    So please either refine your browser detection in a way that it really gets that right, or better, disable it completely. You’re harming your site and nothing else.

  10. <!– CENSORED –>

    And also, as for that update: I think that was what was causing my styles to go all funny (see above), IÒ€ℒll install the plugin and tell you if that is it.

  11. And also, as for that update: I think that was what was causing my styles to go all funny

    I don’t think so, as you are using v1.2.1 & I’m using the same & if it doesn’t go funny on my blog then how come it effects yours? Maybe you are using relative sizes while I’m using fixed sizes. πŸ˜•

    It wasnÒ€ℒt entirely the plugin – instead, itÒ€ℒs an issue with paragraphs inside list items and their stylesÒ€¦

    Hmm, I’ll look into that!! πŸ˜‰

  12. Naah, don’t bother: It’s definately not your fault. The paragraph was aggravating the problem, but it is to do with that wonderful CSS concept of “relativity”…

    However: I was trying to post some syntax-highlighted code the other day, and I ran into problems – I think that WP tried to parse the code to make it compliant, and unfortunately screwed it completely. It seems to do it before your plugin gets to it to highlight it, so the plugin was perfectly highlighting a whole lot of crap ;). Do you have any idea why that would happen, and how to stop it doing that?

  13. Naah, don’t bother: It’s definately not your fault. The paragraph was aggravating the problem, but it is to do with that wonderful CSS concept of “relativity”…

    Well, that’s why I use pixelised dimensions for fonts & percentage for layout. πŸ˜€

    However: I was trying to post some syntax-highlighted code the other day, and I ran into problems – I think that WP tried to parse the code to make it compliant, and unfortunately screwed it completely. It seems to do it before your plugin gets to it to highlight it, so the plugin was perfectly highlighting a whole lot of crap ;). Do you have any idea why that would happen, and how to stop it doing that?

    Well, I haven’t run across this situation yet but if you can eMail me the link to the post where you are having the code screwed up by WP, & what the actual code should have been, maybe I can figure out something. πŸ˜‰

  14. Pingback: Swapdepths
  15. Uhh, I wondered why you put a </> in your code, but now I understand. πŸ˜€ WP prevents you to put any PHP code in your posts so that might be causing problems. I get around them by using the HTML encoding of the < & >. That way there’s no problem in using any tags in my post. And to make things easier, I created a quicktag so that whenever I select some text & click that button, its closed as a tag.

    However, I’ll see to what I can do, but don’t keep your hopes high as this is a WP problem. πŸ˜‰

  16. Yeah, I’m getting sick of not being able to post code properly. You know that problem I’ve been having with wierd font sizes? It’s because WP wasn’t putting content inside ordered lists into paragraphs correctly, so some of the content was and some wasn’t. I really don’t like how I have to use HTML to format stuff – it’s far safer, and easier for the poster, if we are allowed to post HTML as-is, and use some other kind of formatting language like BBCode.

    It makes far more sense if I can just, for example, write <code> foo < bar</code> straight off, rather than having to encode it…

  17. True, it’d sure be easier if the user doesn’t have to encode the tags manually but then the thing is that without this being implemented, you can use HTML in your post if you wish & some people do that(to display the AdSense ads possibly!!). πŸ˜•
    But this can be fixed on plugin level(I think so). I’ll try & see if I can encode the tags enclosed in the code tags of my plugin. πŸ˜‰

  18. Yeah, that would be cool. I don’t know why WP insists on adding random </> parts to the code, but if you could somehow tell it to ignore any HTML inside a code block that would be awesome πŸ™‚

Sliding Sidebar