7f07365695fe34b3669cfd99728d209553b71bfda8445270314fcc5569c168feef51dfb715dca9a031bd29819587a7705655f1ac19350b2ad75908b0d57d45 904 B

123456789101112131415161718192021222324
  1. /* @flow */
  2. import { makeMap } from 'shared/util'
  3. export const isUnaryTag = makeMap(
  4. 'area,base,br,col,embed,frame,hr,img,input,isindex,keygen,' +
  5. 'link,meta,param,source,track,wbr'
  6. )
  7. // Elements that you can, intentionally, leave open
  8. // (and which close themselves)
  9. export const canBeLeftOpenTag = makeMap(
  10. 'colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source'
  11. )
  12. // HTML5 tags https://html.spec.whatwg.org/multipage/indices.html#elements-3
  13. // Phrasing Content https://html.spec.whatwg.org/multipage/dom.html#phrasing-content
  14. export const isNonPhrasingTag = makeMap(
  15. 'address,article,aside,base,blockquote,body,caption,col,colgroup,dd,' +
  16. 'details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,' +
  17. 'h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,' +
  18. 'optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,' +
  19. 'title,tr,track'
  20. )