Tag Archives: textile


Textile Parser Follow-up

TextileIn the previous post, I asked people to give examples of highly detailed campaigns that were pushing Textile to the limits. The goal was to see if it was a good idea to upgrade our parser. Well, I’ve made a decision.

Curent Plan: Do Nothing

Essentially, I think it would be a mistake to upgrade to the newer parser as-is. There are too many places where it will break peoples’ existing work. And, as I feared, the more work you put into making things look nice, the more in danger you are of having the new parser break things for you.

Future Plan: Do Something

However, I’m beginning to believe that perhaps we should be offering more choice on how to handle your input. Many of you are quite comfortable dealing directly with HTML, and Textile just gets in your way, adding paragraphs and such where you don’t want them. Likewise, many of you come from the BBCode forum world and would prefer to work with that. It’s not like we believe that Textile is the be-all-end-all markup language and you should all be forced to learn it. To be perfectly honest, the main reason we went with Textile was that the parser was easy to integrate and allowed us to quickly move forward with other parts of the site.

I’m considering making the input parsing a campaign-wide setting, starting with Textile and raw HTML. Then, as we get more comfortable, we may add more parsers, like Markdown and BBCode. This will allow you to choose the markup language that makes the most sense for your group.

Any thoughts on that?

As always, I’d like to know what you think. Leave a comment if you have any thoughts.

Individual Findings

For those that are interested, these are the individual findings that I discovered while playing around with the new Textile parser.

Most pages render exactly the same

I’ve re-rendered probably a dozen pages and all except one looks exactly the same. The only one that looks different has a bunch of Textile examples on it, as in “Here is how you use Textile for this campaign…” The main takeaway was that for the majority of people, they won’t see a huge change. That’s a good thing, I think.

<br/> tags inserted automatically

This is the main complaint we get, that it’s difficult to insert line-breaks, as Textile ignores a single newline, and converts a double newline into a new paragraph. The newer version of Textile adds line-breaks for single newlines, which should make a lot of you much happier. No more adding <br/> at the end of every line.

And, as a bonus, it won’t double-up the <br> tags. If you already have them there, it won’t add another on top of it. Very nice.

<pre> no longer ignores Textile

If you’re putting Textile inside a <pre> tag in order to give an example of how to use it, it will now be evaluated. This will only affect a very small portion of you, but for those it may be very irritating. The trick to bypassing this is to use the notextile block modifier. Here’s an example:

notextile. p. This won't make a new paragraph, and will show the p. instead of evaluating it
p. Same here...still no new paragraph
Put in br tags manually if you want spacing<br/><br/><br/>
p. Still no new paragraph, but it will have 3 newlines above it.

p. This will be evaluated by Textile and the p. will make it a paragraph (because of the double newline above...)

HTML (mostly) unaffected

If you do all your formatting in HTML, then you’re pretty much safe. The new parser still ignores HTML and passes it straight through. I looked at a handful of pages that were mostly composed in HTML and they looked identical to me.

The more complicated it is, the more it gets mangled

Take a look at ChainsawXIV’s templates and tools page. Pretty sweet, huh? Well it gets mangled pretty badly by the new parser. For some reason, the parser doesn’t even generate valid HTML. It can be somewhat alleviated by putting a notextile modifier right at the start of the page, but that’s definitely not the best way to handle it.


Upgrading Textile – Easier post formatting

TextileI checked recently and found that we haven’t updated our Textile parser in several months. The Textile parser is the piece of code that takes the text you type in and displays it on the webpage. Making tables, bolding text, adding headlines, adding linebreaks, all that stuff.

Update: I’ve made a decision on how to proceed.

We’ve been receiving more and more complaints lately about the inflexibility of Textile and how difficult it can be to get things to look how you want. Looking over the change notes of the new parser, a lot of those concerns have been addressed. However, I’m worried that putting a new parser in place might break a lot of the formatting that many of you have painstakingly created.

If you take great pains to get your campaign to display correctly, please leave a comment here with a link to your campaign. I’m going to test out the new parser in development, and I’d like to see how it works with some well crafted campaigns. If nothing breaks, then it’s a no-brainer to add the new parser. Otherwise, if it seriously destroys existing campaigns, then I’ll have to seriously think about the consequences. Fingers crossed that it’s a no-brainer.

Note: Comments like “Drop Textile and go with XYZ” will get you promptly ignored. We have thousands of people and campaigns all using it, and we can’t just drop it. We may add more parsers and allow you to choose, but that’s a future task.

Award Winning!

Gold ENnie for Best Website 09'-11'

Silver ENnie for Best Website, Best Podcast 2012-2013
Petrified Articles
© Copyright 2010-2024 Words In The Dark. All rights reserved. Created by Dream-Theme — premium wordpress themes. Proudly powered by WordPress.