I migrated my SVN repository to Git yesterday and moved the XBBCode project to
GitHub Drupal.org yesterday. The git migration should make it much easier to manage multiple branches for different Drupal core versions, and also make it much easier for others to contribute in case anyone is interested.
In recent years I have switched from PHP to using Python for most of my programming. That's not because PHP is particularly bad, because having worked with Drupal for most of seven years now, I dismiss that frequent criticism as a mixture of outdated complaints, inexperience and personal taste. PHP doesn't suck, but Python is incredibly awesome. It has lambda expressions! Array slicing! List comprehensions! Lazily-evaluated iterators! In Python, once an algorithm is written down in pseudocode, its implementation is trivial.
As I concluded in the first part, one problem remains with the strict "inner-tag-first" evaluation of code (which roughly equates to a Left-Right-Root traversal of the code tree). Namely, some tags, like
[nocode], require that further code inside them is not parsed.
If you read the code of my Extensible BBCode module for [[Drupal]], you'll notice that my tag parsing algorithm is kind of complex. In two steps, the tags are first "paired" (inserting a matching ID into the opening and closing tag) and then "rendered", all by an evaluated regular expression that calls another function. The process certainly ensures that all tags are balanced - and it even allows some tags to be rendered before others are, regardless of nesting.
I've spent a few more days improving and cleaning up the new version.
One thing I have managed to make loads better is the handler settings form: Instead of a table with simple checkboxes and weight selection elements, the form now uses tablesort and tabledrag. The extra space is used to display the tag description,
(Note: Due to a bug in core most of the cool stuff will not work without applying a core patch.)
Well, as you can see, the NaNoWriMo didn't really work out. Astonishingly, it turns out that a day has only twenty-four hours.
However, I have managed to devote an afternoon this weekend to porting my XBBCode module. This is particularly interesting if you are from Spiderweb, because XBBCode for Drupal 7 is one of the steps on the roadmap to the new Pied Piper Project and the new Blades Forge.
This is just a notice of a bugfix update to XBBCode, my light-weight stack-based parser for customizable and extensible BBCode in Drupal.
I have been developing the module for two years now and using it on this blog for almost as long (see earlier posts), so I've had lots of time to work out most of the bugs.
My pet module XBBCode is finally available for Drupal 6 - at least the core engine and the basic tags. It has undergone a lot of clean-up, including the user interface.
The module will only be packaged as a public release when all sub-modules are converted, but for now, the trunk is available here:
Drupal 6.x is looming. A few months ago, I wouldn't have chosen that particular word, but as it's getting closer and closer, I see past the smoothness and shiny new features and remember what a major Drupal version upgrade actually means for me as a site developer: Endless hours of coding to get my modules compatible with the new API.
DHTML menu, now, was easy. I pretty much spent half a day on getting it to work in D6 - after being stumped for several days regarding the new menu system, of course.