index.js 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. /**
  2. * List of lowercase HTML “block” tag names.
  3. *
  4. * The list, when parsing HTML (flow), results in more relaxed rules (condition
  5. * 6).
  6. * Because they are known blocks, the HTML-like syntax doesn’t have to be
  7. * strictly parsed.
  8. * For tag names not in this list, a more strict algorithm (condition 7) is used
  9. * to detect whether the HTML-like syntax is seen as HTML (flow) or not.
  10. *
  11. * This is copied from:
  12. * <https://spec.commonmark.org/0.30/#html-blocks>.
  13. *
  14. * > 👉 **Note**: `search` was added in `CommonMark@0.31`.
  15. */
  16. export const htmlBlockNames = [
  17. 'address',
  18. 'article',
  19. 'aside',
  20. 'base',
  21. 'basefont',
  22. 'blockquote',
  23. 'body',
  24. 'caption',
  25. 'center',
  26. 'col',
  27. 'colgroup',
  28. 'dd',
  29. 'details',
  30. 'dialog',
  31. 'dir',
  32. 'div',
  33. 'dl',
  34. 'dt',
  35. 'fieldset',
  36. 'figcaption',
  37. 'figure',
  38. 'footer',
  39. 'form',
  40. 'frame',
  41. 'frameset',
  42. 'h1',
  43. 'h2',
  44. 'h3',
  45. 'h4',
  46. 'h5',
  47. 'h6',
  48. 'head',
  49. 'header',
  50. 'hr',
  51. 'html',
  52. 'iframe',
  53. 'legend',
  54. 'li',
  55. 'link',
  56. 'main',
  57. 'menu',
  58. 'menuitem',
  59. 'nav',
  60. 'noframes',
  61. 'ol',
  62. 'optgroup',
  63. 'option',
  64. 'p',
  65. 'param',
  66. 'search',
  67. 'section',
  68. 'summary',
  69. 'table',
  70. 'tbody',
  71. 'td',
  72. 'tfoot',
  73. 'th',
  74. 'thead',
  75. 'title',
  76. 'tr',
  77. 'track',
  78. 'ul'
  79. ]
  80. /**
  81. * List of lowercase HTML “raw” tag names.
  82. *
  83. * The list, when parsing HTML (flow), results in HTML that can include lines
  84. * without exiting, until a closing tag also in this list is found (condition
  85. * 1).
  86. *
  87. * This module is copied from:
  88. * <https://spec.commonmark.org/0.30/#html-blocks>.
  89. *
  90. * > 👉 **Note**: `textarea` was added in `CommonMark@0.30`.
  91. */
  92. export const htmlRawNames = ['pre', 'script', 'style', 'textarea']