Created
October 11, 2009 03:35
-
-
Save BenWard/207380 to your computer and use it in GitHub Desktop.
A for HTMLTidy to prevent it dropping empty elements that have class attributes. Allows it to be used to pre-process HTML containing microformats without stripping out the value-class-pattern.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index: attrs.h | |
=================================================================== | |
RCS file: /cvsroot/tidy/tidy/src/attrs.h,v | |
retrieving revision 1.29 | |
diff -r1.29 attrs.h | |
325a326 | |
> #define attrGetCLASS( nod ) TY_(AttrGetById)( nod, TidyAttr_CLASS ) | |
Index: parser.c | |
=================================================================== | |
RCS file: /cvsroot/tidy/tidy/src/parser.c,v | |
retrieving revision 1.187 | |
diff -r1.187 parser.c | |
289a290,294 | |
> /* Microformats value-class-pattern data fix. Allow empty elements | |
> *with a @class attribute to remain (otherwise they would be dropped) */ | |
> /* attributes */ | |
> if ( attrGetCLASS(element) ) | |
> return no; | |
> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment