« The legendary Microsoft lag | Main | Reader poll »

Feedback on Bö

Tim Gray says he likes Bö and it’s nice to hear it. He also has a couple of interesting comments.

Hopefully Bö will grow into a BBEdit plug just like Markdown and SmartyPants are.

It will, but I haven’t yet figured out a way of calling Markdown from within the BBEdit plug-in portion of Bö, so I decided to wait for Markdown and SmartyPants to be converted to Perl modules. John Gruber once mentioned that he would consider it after Markdown 1.0 is released.

I looked at how Blosxom calls its plugins (including Markdown) but I have not been able to reproduce its behaviour.

I was thinking that it would be kind if Bö could insert the footnote text into the title attribute of the footnote link in the body text. You could then just mouseover the link and read the footnote without leaving your place in the text.

A very nice idea indeed. It should not be too hard to implement, although not as easy at it looks at first, as Tim noticed:

I took a look at the PHP code for the Bö plugin to see if I could modify it myself for the above mentioned behavior, but it appears to me that the plugin doesn’t slurp the actual footnote text until after it writes the footnote link in the main body

The reason why the actual footnote text is slurped after the footnote link is written is to make the distinction between a footnote and a Markdown link definition easier. I only consider a line as the start of a footnote text definition if its label has been used in a footnote call in the text. Thus, I must process links first.

I see two ways of implementing the new feature. I can process the text in three passes (list footnote calls, slurp text and write links) instead of two (list footnote calls while writing links, slurp text) or I can put a placeholder in the link’s title and substitute it with the text later. The former seems a bit cleaner.

I also have to see how to pre-process the footnote text before putting it in the title attribute. Markup should be removed and it should probably be truncated to a reasonable length (e.g. n characters or the first paragraph).


TrackBack URL for this entry: http://ithink.ch/blog/tb.cgi/75.

Make sure JavaScript is enabled before using this URL. If you would like to ping my blog but can't, please do send me an e-mail at os3476 at this domain.



I have hacked a bit your Bö code to adapt It to MT 4.01 plugins mechanism. It was an easy hack (Only changing the registry mechanism, the rest of the code is yours).

Would you like me to send you the changed code to take a look on It?

Post a comment

Make sure JavaScript is enabled before posting a comment. If you would like to post a comment but can't, please do send me an e-mail at os3476 at this domain.

Do not meddle in the affairs of Coding Ninjas, for they are subtle and quick to anger.