Hi,
I just saw that there is a tiny bug in the JavaScript function goTo (id) in markdown_to_help.rb. If you click at an item in the TOC it jumps to that anker but with a wrong offset, meaning the beginning of the anker is hidden caused by the TextMate header image.
To solve that problem easily I would suggest to do the following if one predicts that the first image in the html source code is "header.png":
markdown_to_help.rb:
old: 68: function goTo (id) { 69: document.body.scrollTop = document.getElementById(id).offsetTop + 8; 70: }
new: old: 68: function goTo (id) { 69: document.body.scrollTop = document.getElementById(id).offsetTop - document.images[0].height - 1; 70: }
Cheers,
--Hans
On 24/10/2007, at 09:25, Hans-Joerg Bibiko wrote:
I just saw that there is a tiny bug in the JavaScript function goTo(id) in markdown_to_help.rb. If you click at an item in the TOC it jumps to that anker but with a wrong offset, meaning the beginning of the anker is hidden caused by the TextMate header image. [...]
The reason we switched to JS was actually to avoid this offset. I reckon the behavior changed with latest WebKit.
I will update the code, thanks.