@@ -102,6 +102,11 @@ static AttrCheck CheckSvgAttr;
102102#define CH_DECIMAL CheckDecimal
103103#define CH_SVG CheckSvgAttr
104104
105+ /*
106+ WARNING: This table /must/ be kept in the EXACT order of the TidyAttrId enum!
107+ When running the DEBUG version, this order is checked, in TY_(InitAttrs)(doc),
108+ and there is an assert() if any difference found.
109+ */
105110static const Attribute attribute_defs [] =
106111{
107112 { TidyAttr_UNKNOWN , "unknown!" , NULL },
@@ -183,7 +188,6 @@ static const Attribute attribute_defs [] =
183188 { TidyAttr_LAST_VISIT , "last_visit" , CH_PCDATA }, /* A */
184189 { TidyAttr_LEFTMARGIN , "leftmargin" , CH_NUMBER }, /* used on BODY */
185190 { TidyAttr_LINK , "link" , CH_COLOR }, /* BODY */
186- { TidyAttr_LOADING , "loading" , CH_LOADING }, /* IMG, IFRAME */
187191 { TidyAttr_LONGDESC , "longdesc" , CH_URL }, /* IMG */
188192 { TidyAttr_LOWSRC , "lowsrc" , CH_URL }, /* IMG */
189193 { TidyAttr_MARGINHEIGHT , "marginheight" , CH_NUMBER }, /* FRAME, IFRAME, BODY */
@@ -245,7 +249,6 @@ static const Attribute attribute_defs [] =
245249 { TidyAttr_SHOWGRIDX , "showgridx" , CH_BOOL }, /* TABLE Adobe golive*/
246250 { TidyAttr_SHOWGRIDY , "showgridy" , CH_BOOL }, /* TABLE Adobe golive*/
247251 { TidyAttr_SIZE , "size" , CH_NUMBER }, /* HR, FONT, BASEFONT, SELECT */
248- { TidyAttr_SLOT , "slot" , CH_PCDATA },
249252 { TidyAttr_SPAN , "span" , CH_NUMBER }, /* COL, COLGROUP */
250253 { TidyAttr_SRC , "src" , CH_URL }, /* IMG, FRAME, IFRAME */
251254 { TidyAttr_SRCSET , "srcset" , CH_PCDATA }, /* IMG (HTML5) */
@@ -447,6 +450,8 @@ static const Attribute attribute_defs [] =
447450
448451 /* for xmlns:xlink in <svg> */
449452 { TidyAttr_XMLNSXLINK , "xmlns:xlink" , CH_URL },
453+ { TidyAttr_SLOT , "slot" , CH_PCDATA },
454+ { TidyAttr_LOADING , "loading" , CH_LOADING }, /* IMG, IFRAME */
450455
451456 /* SVG paint attributes (SVG 1.1) */
452457 { TidyAttr_FILL , "fill" , CH_SVG },
0 commit comments