UNPKG

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