mirror of
https://github.com/Orc/discount.git
synced 2026-09-25 04:10:00 +03:00
This involves reworking the blocktag[] array into a STRING(), and moving the entire kit and kaboodle out into a separate file with a public initializer (mkd_prepare_tags), definer (mkd_define_tag) sort (mkd_sort_tags, and lookup (mkd_search_tags) function. The html5 tags are further removed into their own function (mkd_with_html5_tags) which can be included when someone wishes to have html5 support. Note that html5 support is library-wide; once you call mkd_with_html5_tags, you're stuck with them everywhere and can't back them out. This might be revisited later,
18 lines
362 B
Perl
18 lines
362 B
Perl
. tests/functions.sh
|
|
|
|
title "html5 blocks (mkd_with_html5_tags)"
|
|
|
|
rc=0
|
|
MARKDOWN_FLAGS=
|
|
|
|
try -5 'html5 block elements enabled' \
|
|
'<aside>html5 does not suck</aside>' \
|
|
'<aside>html5 does not suck</aside>'
|
|
|
|
try 'html5 block elements disabled' \
|
|
'<aside>html5 sucks</aside>' \
|
|
'<p><aside>html5 sucks</aside></p>'
|
|
|
|
summary $0
|
|
exit $rc
|