#5 ✓invalid

maruku table of contents not generating without extra h1 tag

Reported by Tia | January 14th, 2010 @ 03:10 PM

The maruku markdown table of contents tag


requires the page to have 4 elements in order to create a contents block

  1. an h1 header on the page
  2. {:toc} tag
    • list before the {:toc}
  3. h2 with {#h2name} tag

Inside the webiva markdown editor (such as in the book module)

h1 is the page title and automatically put on the page. since this is not part of the book_page creation block passed to makuru during conversion, the h1 is not seen and the table of contents paragraph is not rendered (as seen in irb)

      md_el(:ul,[md_el(:li_span,["Menu"],{:want_my_paragraph=>false},[])],{},[[:ref, "toc"]]),

if you add an h1 tag on the page before saving, it generates the toc correctly

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Shared Ticket Bins

People watching this ticket