Add support for link 'as' attribute (closes #449)

This commit is contained in:
Marcos Caceres 2016-08-23 18:36:25 +10:00
parent d2fc252598
commit e4ae9c064d
3 changed files with 6 additions and 0 deletions

View File

@ -848,6 +848,8 @@ typedef enum
TidyAttr_INTEGRITY, /**< INTEGRITY= */
TidyAttr_AS, /**< AS= */
N_TIDY_ATTRIBS /**< Must be last */
} TidyAttrId;

View File

@ -1950,6 +1950,7 @@ const AttrVersion TY_(W3CAttrsFor_LINK)[] =
{
INCLUDE_ARIA
INCLUDE_MICRODATA
{ TidyAttr_AS, xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|HT50|XH50 },
{ TidyAttr_CHARSET, xxxx|xxxx|H40T|H41T|X10T|H40F|H41F|X10F|H40S|H41S|X10S|XH11|XB10|xxxx|xxxx },
{ TidyAttr_CLASS, xxxx|xxxx|H40T|H41T|X10T|H40F|H41F|X10F|H40S|H41S|X10S|XH11|XB10|HT50|XH50 }, /* CORE override */
{ TidyAttr_CROSSORIGIN, xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|HT50|XH50 },

View File

@ -440,6 +440,9 @@ static const Attribute attribute_defs [] =
{ TidyAttr_INTEGRITY, "integrity", CH_PCDATA },
/* Preload spec: https://www.w3.org/TR/preload/ */
{ TidyAttr_AS, "as", CH_PCDATA },
/* this must be the final entry */
{ N_TIDY_ATTRIBS, NULL, NULL }
};