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).