. tests/functions.sh rc=0 MARKDOWN_FLAGS= # old-style; uses id= tag (and collides # with #-style css) title "(old) table-of-contents support" try -fidanchor '-T -ftoc' 'table of contents' \ '#H1 hi' \ '

H1

hi

' try -fidanchor -fnohtml5anchor '-T -ftoc' 'toc item with link' \ '##[H2](H2) here' \ '

H2 here

' try -fidanchor -fnohtml5anchor '-T -ftoc' 'toc item with non-alpha start' \ '#1 header' \ '

1 header

' try -fidanchor -fhtml5anchor '-T -ftoc' 'toc item with non-alpha start (url encoded)' \ '#1 header' \ '

1 header

' summary $0 # new-style; uses a (depreciated) name= # inside a null tag title "(new) table-of-contents support" try '-T -ftoc' 'table of contents' \ '#H1 hi' \ '

H1

hi

' try '-T -ftoc' 'toc item with link' \ '##[H2](H2) here' \ '

H2 here

' try '-T -ftoc' 'toc item with non-alpha start' \ '#1 header' \ '

1 header

' # Be sure to save toc.t as UTF-8. try '-T -ftoc,html5anchor' 'html5 multibyte chars' \ '#It’s an apostrophe' \ '

It’s an apostrophe

' summary $0 # Check that the uniquifier works # title "uniquifying duplicate headers" try '-T -ftoc' 'uniquifying duplicate labels' \ '# this # this' \ '

this

this

' summary $0 exit $rc