diff --git a/include/tidyenum.h b/include/tidyenum.h index 3daee5b..543a82e 100644 --- a/include/tidyenum.h +++ b/include/tidyenum.h @@ -988,6 +988,7 @@ typedef enum TidyTag_OUTPUT, /**< OUTPUT */ TidyTag_PROGRESS, /**< PROGRESS */ TidyTag_SECTION, /**< SECTION */ + TidyTag_SLOT, /**< SLOT */ TidyTag_SOURCE, /**< SOURCE */ TidyTag_SUMMARY, /**< SUMMARY */ TidyTag_TEMPLATE, /**< TEMPLATE */ @@ -1143,6 +1144,7 @@ typedef enum TidyAttr_SHOWGRIDX, /**< SHOWGRIDX= */ TidyAttr_SHOWGRIDY, /**< SHOWGRIDY= */ TidyAttr_SIZE, /**< SIZE= */ + TidyAttr_SLOT, /**< SLOT= */ TidyAttr_SPAN, /**< SPAN= */ TidyAttr_SRC, /**< SRC= */ TidyAttr_SRCSET, /**< SRCSET= (HTML5) */ diff --git a/src/attrdict.c b/src/attrdict.c index 23322d1..c92d64e 100644 --- a/src/attrdict.c +++ b/src/attrdict.c @@ -95,6 +95,7 @@ { TidyAttr_IS, xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|HT50|XH50 }, \ { TidyAttr_LANG, xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|HT50|XH50 }, \ { TidyAttr_ROLE, xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|HT50|XH50 }, \ + { TidyAttr_SLOT, xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|HT50|XH50 }, \ { TidyAttr_SPELLCHECK, xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|HT50|XH50 }, \ { TidyAttr_STYLE, xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|HT50|XH50 }, \ { TidyAttr_TABINDEX, xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|HT50|XH50 }, \ @@ -2880,6 +2881,17 @@ const AttrVersion TY_(W3CAttrsFor_SMALL)[] = { TidyAttr_UNKNOWN, 0 }, }; +const AttrVersion TY_(W3CAttrsFor_SLOT)[] = +{ + INCLUDE_ARIA + INCLUDE_MICRODATA + { TidyAttr_NAME, xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|HT50|XH50 }, + INCLUDE_CORE_ATTRIBS + INCLUDE_CORE_EVENTS + INCLUDE_RDFA + { TidyAttr_UNKNOWN, 0 }, +}; + const AttrVersion TY_(W3CAttrsFor_SOURCE)[] = { INCLUDE_ARIA diff --git a/src/attrdict.h b/src/attrdict.h index 775ce40..4576300 100644 --- a/src/attrdict.h +++ b/src/attrdict.h @@ -142,6 +142,7 @@ extern const AttrVersion TY_(W3CAttrsFor_OUTPUT)[]; extern const AttrVersion TY_(W3CAttrsFor_MENUITEM)[]; extern const AttrVersion TY_(W3CAttrsFor_METER)[]; extern const AttrVersion TY_(W3CAttrsFor_PROGRESS)[]; +extern const AttrVersion TY_(W3CAttrsFor_SLOT)[]; extern const AttrVersion TY_(W3CAttrsFor_TEMPLATE)[]; extern const AttrVersion TY_(W3CAttrsFor_TIME)[]; extern const AttrVersion TY_(W3CAttrsFor_DATA)[]; diff --git a/src/attrs.c b/src/attrs.c index 4231935..ff4f076 100644 --- a/src/attrs.c +++ b/src/attrs.c @@ -238,6 +238,7 @@ static const Attribute attribute_defs [] = { TidyAttr_SHOWGRIDX, "showgridx", CH_BOOL }, /* TABLE Adobe golive*/ { TidyAttr_SHOWGRIDY, "showgridy", CH_BOOL }, /* TABLE Adobe golive*/ { TidyAttr_SIZE, "size", CH_NUMBER }, /* HR, FONT, BASEFONT, SELECT */ + { TidyAttr_SLOT, "slot", CH_PCDATA }, { TidyAttr_SPAN, "span", CH_NUMBER }, /* COL, COLGROUP */ { TidyAttr_SRC, "src", CH_URL }, /* IMG, FRAME, IFRAME */ { TidyAttr_SRCSET, "srcset", CH_PCDATA }, /* IMG (HTML5) */ diff --git a/src/attrs.h b/src/attrs.h index befdcd1..c950acb 100644 --- a/src/attrs.h +++ b/src/attrs.h @@ -315,6 +315,7 @@ Bool TY_(AttributeIsMismatched)(Node* node, AttVal* attval, TidyDocImpl* doc); #define attrIsSHOWGRIDX(av) AttrIsId( av, TidyAttr_SHOWGRIDX ) #define attrIsSHOWGRIDY(av) AttrIsId( av, TidyAttr_SHOWGRIDY ) #define attrIsSIZE(av) AttrIsId( av, TidyAttr_SIZE ) +#define attrIsSLOT(av) AttrIsId( av, TidyAttr_SLOT ) #define attrIsSPAN(av) AttrIsId( av, TidyAttr_SPAN ) #define attrIsSRC(av) AttrIsId( av, TidyAttr_SRC ) #define attrIsSTANDBY(av) AttrIsId( av, TidyAttr_STANDBY ) diff --git a/src/tags.c b/src/tags.c index 34c08ff..70fb5ac 100644 --- a/src/tags.c +++ b/src/tags.c @@ -151,6 +151,7 @@ static CheckAttribs CheckHTML; #define VERS_ELEM_OUTPUT (xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|HT50|XH50) #define VERS_ELEM_PROGRESS (xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|HT50|XH50) #define VERS_ELEM_SECTION (xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|HT50|XH50) +#define VERS_ELEM_SLOT (xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|HT50|XH50) #define VERS_ELEM_SOURCE (xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|HT50|XH50) #define VERS_ELEM_SUMMARY (xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|HT50|XH50) #define VERS_ELEM_TEMPLATE (xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|HT50|XH50) @@ -321,6 +322,7 @@ static Dict tag_defs[] = { TidyTag_OUTPUT, "output", VERS_ELEM_OUTPUT, &TY_(W3CAttrsFor_OUTPUT)[0], (CM_INLINE), TY_(ParseInline), NULL }, { TidyTag_PROGRESS, "progress", VERS_ELEM_PROGRESS, &TY_(W3CAttrsFor_PROGRESS)[0], (CM_INLINE), TY_(ParseInline), NULL }, { TidyTag_SECTION, "section", VERS_ELEM_SECTION, &TY_(W3CAttrsFor_SECTION)[0], (CM_BLOCK), TY_(ParseBlock), NULL }, + { TidyTag_SLOT, "slot", VERS_ELEM_SLOT, &TY_(W3CAttrsFor_SLOT)[0], (CM_BLOCK|CM_INLINE|CM_MIXED), TY_(ParseBlock), NULL }, { TidyTag_SOURCE, "source", VERS_ELEM_SOURCE, &TY_(W3CAttrsFor_SOURCE)[0], (CM_BLOCK|CM_INLINE|CM_EMPTY), TY_(ParseBlock), NULL }, { TidyTag_SUMMARY, "summary", VERS_ELEM_SUMMARY, &TY_(W3CAttrsFor_SUMMARY)[0], (CM_BLOCK), TY_(ParseBlock), NULL }, /* Is. #895 */ { TidyTag_TEMPLATE, "template", VERS_ELEM_TEMPLATE, &TY_(W3CAttrsFor_TEMPLATE)[0], (CM_BLOCK), TY_(ParseBlock), NULL },