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.

49 lines
917 B

  1. . tests/functions.sh
  2. title "%div% blocks"
  3. rc=0
  4. MARKDOWN_FLAGS=
  5. try 'simple >%div% block' \
  6. '>%this%
  7. this this' \
  8. '<div class="this"><p>this this</p></div>'
  9. try 'two >%div% blocks in a row' \
  10. '>%this%
  11. this this
  12. >%that%
  13. that that' \
  14. '<div class="this"><p>this this</p></div>
  15. <div class="that"><p>that that</p></div>'
  16. try '>%class:div%' \
  17. '>%class:this%
  18. this this' \
  19. '<div class="this"><p>this this</p></div>'
  20. try '>%id:div%' \
  21. '>%id:this%
  22. this this' \
  23. '<div id="this"><p>this this</p></div>'
  24. try 'nested >%div%' \
  25. '>%this%
  26. >>%that%
  27. >>that
  28. >%more%
  29. more' \
  30. '<div class="this"><div class="that"><p>that</p></div></div>
  31. <div class="more"><p>more</p></div>'
  32. try '%class% with _' '>%class:this_that%' '<div class="this_that"></div>'
  33. try '%class% with -' '>%class:this-that%' '<div class="this-that"></div>'
  34. try 'illegal %class%' '>%class:0zip%' '<blockquote><p>%class:0zip%</p></blockquote>'
  35. summary $0
  36. exit $rc