emphasis_and_strong.unit 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. >>> single asterisks
  2. before *em* after
  3. <<<
  4. <p>before <em>em</em> after</p>
  5. >>> single underscores
  6. before _em_ after
  7. <<<
  8. <p>before <em>em</em> after</p>
  9. >>> double asterisks
  10. before **strong** after
  11. <<<
  12. <p>before <strong>strong</strong> after</p>
  13. >>> double underscores
  14. before __strong__ after
  15. <<<
  16. <p>before <strong>strong</strong> after</p>
  17. >>> unmatched asterisk
  18. before *after
  19. <<<
  20. <p>before *after</p>
  21. >>> unmatched underscore
  22. before _after
  23. <<<
  24. <p>before _after</p>
  25. >>> multiple spans in one text
  26. a *one* b _two_ c
  27. <<<
  28. <p>a <em>one</em> b <em>two</em> c</p>
  29. >>> multi-line
  30. before *first
  31. second* after
  32. <<<
  33. <p>before <em>first
  34. second</em> after</p>
  35. >>> not processed when surrounded by spaces
  36. a * b * c _ d _ e
  37. <<<
  38. <p>a * b * c _ d _ e</p>
  39. >>> strong then emphasis
  40. **strong***em*
  41. <<<
  42. <p><strong>strong</strong><em>em</em></p>
  43. >>> emphasis then strong
  44. *em***strong**
  45. <<<
  46. <p><em>em</em><strong>strong</strong></p>
  47. >>> emphasis inside strong
  48. **strong *em***
  49. <<<
  50. <p><strong>strong <em>em</em></strong></p>
  51. >>> mismatched in nested
  52. *a _b* c_
  53. <<<
  54. <p><em>a _b</em> c_</p>
  55. >>> in the middle of a word
  56. a_b_c a__b__c a*b*c a**b**c
  57. <<<
  58. <p>a_b_c a__b__c a<em>b</em>c a<strong>b</strong>c</p>
  59. >>> prefixing a word
  60. _a_b __a__b *a*b **a**b
  61. <<<
  62. <p>_a_b __a__b <em>a</em>b <strong>a</strong>b</p>
  63. >>> suffixing a word
  64. a_b_ a__b__ a*b* a**b**
  65. <<<
  66. <p>a_b_ a__b__ a<em>b</em> a<strong>b</strong></p>
  67. >>> spanning words
  68. _a_b c_d_ __a__b c__d__ *a*b c*d* **a**b c**d**
  69. <<<
  70. <p><em>a_b c_d</em> <strong>a__b c__d</strong> <em>a</em>b c<em>d</em> <strong>a</strong>b c<strong>d</strong></p>