Monday, March 19, 2007

bLADE Wiki - 2.0.0 released

Complete rewrite of wiki parser

Warning: This makes this a potentially risky update. If you're the nervous sort, you might want to hold off on this update until I've found the potential new kinks in the code. Or at least keep a copy of your current version. The wiki parser code is all brand-new and relatively untested!

I have now rewritten the wiki parser code from scratch. In theory, if I've done it right, you shouldn't notice any difference - your pages should look the same.

It should bring a number of benefits:

  • Faster

    On the desktop, you're unlikely to spot the difference, but when on Windows Mobile, it should shave a little time off the loading of larger pages. The new wiki parser uses a much more efficient approach to scanning the text.

  • Enable new features

    The structure of the new wiki parser should make it easier for me to add new features. For example:

    • Different syntax-highlighting to distinguish between internal and external links (use a.internal and a.external in the stylesheet to set how you want them to appear)

    • New user preference - should wiki markup be applied in links?

      With this option set to 'disabled', you wouldn't need to 'escape' a URL which you copy and paste into the wiki:
      e.g. wouldn't need to be turned into to work.
      But if you like the old behaviour, you can use Preferences to restore it

    • Export whole wiki to HTML

      This isn't quite finished yet, but should be soon - instead of exporting a single page, export your whole wiki to a directory in HTML format.

    • External links in the mobile wiki

      This isn't finished yet either, but you can click on an external link and then continue clicking around your wiki. In the meantime though, when you leave your wiki, you will lose the ability to edit any pages until you restart. This is a limitation which I'll sort out soon - but it's still an improvement on the old version, where you couldn't click on external links at all :-)

  • More flexible

    The old parser was very "special-case"-heavy - it essentially had a set of patterns it recognised, and carried out a fairly heavyweight set of search-replace's to turn them into the correct HTML. This meant that you were often limited to the special cases I had thought of. For example, it meant that you could not include links in headings.
    +This is my [heading] here
    wouldn't work before. But now it should be fine.
    The new version should have far fewer restrictions like these, as it's a bit cleverer in how it parses the text.

  • More error-tolerant

    Similar to the last comment above, the new approach to scanning the input wiki markup should mean that it handles invalid wiki markup better. For example, the old wiki app would have problems with mismatched link tags (e.g. [ without a ], or [ and ] in the wrong order - that sort of thing). The new parser maintains the current state, and should be able to cope with invalid wiki markup in a graceful way.


At 9:09 AM, Blogger Dale Lane said...

Bug report 1: The old parser would highlight search results in pages opened from a search window. I forgot to include this feature in the new parser - sorry! I'll try and add that back again soon.

On the plus side, I am noticing speed improvements on page generation on Windows Mobile - so I'm happy that the rewrite has been worth it so far. :-)

At 1:21 AM, Blogger Dale Lane said...

If you're still waiting before moving to version 2, I'd say it's probably safe to give it a go now.

It's probably as (un-)reliable as version 1 was :-)



Post a Comment

<< Home