. tests/functions.sh rc=0 MARKDOWN_FLAGS= if ./markdown -V | grep ID-ANCHOR >/dev/null; then # old-style; uses id= tag (and collides # with #-style css) title "(old) 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

' else # 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

' fi summary $0 exit $rc