Support » Plugins and Hacks » Beautify your code

  • After struggling with textile and ‘wptexturize’ for several hours, I finally got Textile and Beautifier working in tandem. Mostly. Anyway, a link is obviously in order. You’ll see my code is being syntax highlighted and I am a happy camper.
    Incidentally, if you want it, the whole hack is available and it’s pretty darn simple to add it to your site. The hardest bit is that on top of downloading beautifier, you need to upgrade Textile from the frustratingly error prone 1.0 release that’s included with WordPress.
    (edit: oops, i meant Textile, not texturizer. Freudian slip)

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hmm…I’m trying this out but I’m getting a blank page once it’s all said and done. Restoring the original textile.php seems to correct this. Is it necessary to change the single character global variables, or can they be left intact?

    Well, when I left them intact, I kept getting “there are no posts that match…” on my page.
    Did you just copy my version of the file? (if you click the link in the article, you can click the name of the file at the top to see it without line numbers (so you can copy and paste).

    Hey, just a couple questions: I was sort-of assuming that nobody was interested in this, and then I looked at my server logs and it looks like I’ve gotten a few hits from this thread … so (if anyone out there in dev-land is reading):
    1) Since I assume that code beautifying isn’t in high demand, this probably doesn’t belong in the default WordPress install, but can I get this put on the ‘official hacks’ page?
    2) Is there any particular reason why WordPress has it’s own “wptexturize” instead of just using the ‘lite’ textile option (or even a very simple modification to make a ‘liter still’ option) ?

    Because texturize does a lot more than textile with regards to typographic entities. Textile is more focused on a shorthand formatting meta-language, parts of which will possibly be integrated in the future.

    Hmm. I know on the MT-Textile plugin they used another plugin (SmartyPants) to handle encoding quotes and such … I think Beta 2 of Textile does a lot more of that … but I guess my next question is: can we make texturize just handle entity encoding (or make that part of it seperate)?
    The thing is, I depend on this shorthand entry stuff, it saves me a ton of time. Plus, it enhances the safety of my site, because I don’t allow html in my comments at all (but you can format using Textile’s shorthand. But I’d still like the nice typographical corrections … actually, what I would REALLY like is for the typographical corrections to be made on the way IN to the database …
    I’ll post more about this in a feature request.

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.