HTML-Valid
view release on metacpan or search on metacpan
tidy-html5.c view on Meta::CPAN
continue;
}
PPrintChar( doc, c, mode );
}
ClearInAttrVal( pprint );
ClearInString( pprint );
}
AddChar( pprint, delim );
}
static unsigned int AttrIndent( TidyDocImpl* doc, Node* node, AttVal* ARG_UNUSED(attr) )
{
unsigned int spaces = cfg( doc, TidyIndentSpaces );
unsigned int xtra = 2; /* 1 for the '<', another for the ' ' */
if ( node->element == NULL )
return spaces;
if ( !TY_(nodeHasCM)(node, CM_INLINE) ||
!ShouldIndent(doc, node->parent ? node->parent: node) )
return xtra + TY_(tmbstrlen)( node->element );
tidy-html5.c view on Meta::CPAN
static void PPrintAttribute( TidyDocImpl* doc, unsigned int indent,
Node *node, AttVal *attr )
{
TidyPrintImpl* pprint = &doc->pprint;
Bool xmlOut = cfgBool( doc, TidyXmlOut );
Bool xhtmlOut = cfgBool( doc, TidyXhtmlOut );
Bool wrapAttrs = cfgBool( doc, TidyWrapAttVals );
unsigned int ucAttrs = cfg( doc, TidyUpperCaseAttrs );
Bool indAttrs = cfgBool( doc, TidyIndentAttributes );
unsigned int xtra = AttrIndent( doc, node, attr );
Bool first = AttrNoIndentFirst( /*doc,*/ node, attr );
tmbstr name = attr->attribute;
Bool wrappable = no;
tchar c;
/* fix for odd attribute indentation bug triggered by long values */
if (!indAttrs)
xtra = 0;
if ( indAttrs )
( run in 0.293 second using v1.01-cache-2.11-cpan-a5abf4f5562 )