On Wed, Mar 18, 2009 at 5:07 PM, Holger Rapp <Hol...@gm...> wrote:
> Hey,
>
> i just found the TOC extension in current git repository, and I love it!
Glad to hear it.
>
> I only discovered one bug. I wanted to add a <hr> after my toc, so i
> did:
>
> <snip>
> [TOC]
> ----------
> </snap>
Well, without the toc extension, that produces ``<h2>[TOC]</h2>`` [1].
So don't do that. You wouldn't get a ``<hr>`` anyway. If you really
want a ``<hr>``, you need to have a blank line before it.
That said, it shouldn't crash. So I just pushed a fix and test. Thanks
for the report.
It turns out the marker was causing an infinite loop where it would
build a new toc inside the toc item pointing to the header with the
marker. To avoid it, I have disallowed the marker in any headers
(h1-6). The marker is just passed through as text in the header
(``<h2>[TOC]</h2>``). The unexpected result should clue the document
author into the problem with his/her markup without any crashes.
[1]: http://babelmark.bobtfish.net/?markdown=[TOC]%0D%0A----------
--
----
\X/ /-\ `/ |_ /-\ |\|
Waylan Limberg
|