Merge pull request #769 from AntoniosHadji/issue-649

Issue #649 adding 'data' tag
This commit is contained in:
Geoff McLane 2019-03-21 20:28:26 +01:00 committed by GitHub
commit a71031f9e5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 16 additions and 0 deletions

View file

@ -971,6 +971,7 @@ typedef enum
TidyTag_BDI, /**< BDI */
TidyTag_CANVAS, /**< CANVAS */
TidyTag_COMMAND, /**< COMMAND */
TidyTag_DATA, /**< DATA */
TidyTag_DATALIST, /**< DATALIST */
TidyTag_DETAILS, /**< DETAILS */
TidyTag_DIALOG, /**< DIALOG */

View file

@ -3395,6 +3395,17 @@ const AttrVersion TY_(W3CAttrsFor_TIME)[] =
{ TidyAttr_UNKNOWN, 0 },
};
const AttrVersion TY_(W3CAttrsFor_DATA)[] =
{
INCLUDE_ARIA
INCLUDE_MICRODATA
{ TidyAttr_VALUE, 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_TITLE)[] =
{
INCLUDE_ARIA

View file

@ -144,6 +144,7 @@ extern const AttrVersion TY_(W3CAttrsFor_METER)[];
extern const AttrVersion TY_(W3CAttrsFor_PROGRESS)[];
extern const AttrVersion TY_(W3CAttrsFor_TEMPLATE)[];
extern const AttrVersion TY_(W3CAttrsFor_TIME)[];
extern const AttrVersion TY_(W3CAttrsFor_DATA)[];
extern const AttrVersion TY_(W3CAttrsFor_DATALIST)[];
extern const AttrVersion TY_(W3CAttrsFor_AUDIO)[];
extern const AttrVersion TY_(W3CAttrsFor_VIDEO)[];

View file

@ -133,6 +133,7 @@ static CheckAttribs CheckHTML;
#define VERS_ELEM_CANVAS (xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|HT50|XH50)
#define VERS_ELEM_COMMAND (xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|HT50|XH50)
#define VERS_ELEM_DATALIST (xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|HT50|XH50)
#define VERS_ELEM_DATA (xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|HT50|XH50)
#define VERS_ELEM_DETAILS (xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|HT50|XH50)
#define VERS_ELEM_DIALOG (xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|HT50|XH50)
#define VERS_ELEM_EMBED (xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|HT50|XH50)
@ -302,6 +303,7 @@ static Dict tag_defs[] =
{ TidyTag_COMMAND, "command", VERS_ELEM_COMMAND, &TY_(W3CAttrsFor_COMMAND)[0], (CM_HEAD|CM_INLINE|CM_EMPTY), TY_(ParseEmpty), NULL },
{ TidyTag_DATALIST, "datalist", VERS_ELEM_DATALIST, &TY_(W3CAttrsFor_DATALIST)[0], (CM_INLINE|CM_FIELD), TY_(ParseDatalist), NULL },
/* { TidyTag_DATALIST, "datalist", VERS_ELEM_DATALIST, &TY_(W3CAttrsFor_DATALIST)[0], (CM_FIELD), TY_(ParseInline), NULL },*/
{ TidyTag_DATA, "data", VERS_ELEM_DATA, &TY_(W3CAttrsFor_DATA)[0], (CM_INLINE), TY_(ParseInline), NULL },
{ TidyTag_DETAILS, "details", VERS_ELEM_DETAILS, &TY_(W3CAttrsFor_DETAILS)[0], (CM_BLOCK), TY_(ParseBlock), NULL },
{ TidyTag_DIALOG, "dialog", VERS_ELEM_DIALOG, &TY_(W3CAttrsFor_DIALOG)[0], (CM_BLOCK), TY_(ParseBlock), NULL },
{ TidyTag_EMBED, "embed", VERS_ELEM_EMBED, &TY_(W3CAttrsFor_EMBED)[0], (CM_INLINE|CM_IMG|CM_EMPTY), TY_(ParseEmpty), NULL },

View file

@ -454,6 +454,7 @@ uint TY_(nodeHeaderLevel)( Node* node );
/* HTML5 */
#define nodeIsDATALIST( node ) TagIsId( node, TidyTag_DATALIST )
#define nodeIsDATA( node ) TagIsId( node, TidyTag_DATA )
#define nodeIsMATHML( node ) TagIsId( node, TidyTag_MATHML ) /* #130 MathML attr and entity fix! */
/* NOT in HTML 5 */