Text::Markdown::Discount
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
796 B

  1. . tests/functions.sh
  2. title "pseudo-protocols"
  3. rc=0
  4. MARKDOWN_FLAGS=
  5. try '[](id:) links' '[foo](id:bar)' '<p><span id="bar">foo</span></p>'
  6. try -fnoext '[](id:) links with -fnoext' '[foo](id:bar)' '<p>[foo](id:bar)</p>'
  7. try '[](class:) links' '[foo](class:bar)' '<p><span class="bar">foo</span></p>'
  8. try -fnoext '[](class:) links with -fnoext' '[foo](class:bar)' '<p>[foo](class:bar)</p>'
  9. try '[](lang:) links' '[foo](lang:en)' '<p><span lang="en">foo</span></p>'
  10. try -fnoext '[](lang:) links with -fnoext' '[foo](lang:en)' '<p>[foo](lang:en)</p>'
  11. try '[](raw:) links' '[foo](raw:bar)' '<p>bar</p>'
  12. try -fnoext '[](raw:) links with -fnoext' '[foo](raw:bar)' '<p>[foo](raw:bar)</p>'
  13. # try '[](id:) wrapping a href' '[[foo](bar)](id:baz)' '<p><span id="baz">foo</span></p>'
  14. summary $0
  15. exit $rc