Remove unnecessary AdjustConfig logic.
This commit is contained in:
parent
350f7b4af7
commit
86e62dbb70
|
@ -619,7 +619,6 @@ void TY_(TakeConfigSnapshot)( TidyDocImpl* doc )
|
||||||
const TidyOptionValue* value = &doc->config.value[ 0 ];
|
const TidyOptionValue* value = &doc->config.value[ 0 ];
|
||||||
TidyOptionValue* snap = &doc->config.snapshot[ 0 ];
|
TidyOptionValue* snap = &doc->config.snapshot[ 0 ];
|
||||||
|
|
||||||
TY_(AdjustConfig)( doc ); /* Make sure it's consistent */
|
|
||||||
for ( ixVal=0; ixVal < N_TIDY_OPTIONS; ++option, ++ixVal )
|
for ( ixVal=0; ixVal < N_TIDY_OPTIONS; ++option, ++ixVal )
|
||||||
{
|
{
|
||||||
assert( ixVal == (uint) option->id );
|
assert( ixVal == (uint) option->id );
|
||||||
|
@ -668,7 +667,6 @@ void TY_(CopyConfig)( TidyDocImpl* docTo, TidyDocImpl* docFrom )
|
||||||
}
|
}
|
||||||
if ( needReparseTagsDecls )
|
if ( needReparseTagsDecls )
|
||||||
ReparseTagDecls( docTo, changedUserTags );
|
ReparseTagDecls( docTo, changedUserTags );
|
||||||
TY_(AdjustConfig)( docTo ); /* Make sure it's consistent */
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -962,8 +960,6 @@ int TY_(ParseConfigFileEnc)( TidyDocImpl* doc, ctmbstr file, ctmbstr charenc )
|
||||||
if ( fname != (tmbstr) file )
|
if ( fname != (tmbstr) file )
|
||||||
TidyDocFree( doc, fname );
|
TidyDocFree( doc, fname );
|
||||||
|
|
||||||
TY_(AdjustConfig)( doc );
|
|
||||||
|
|
||||||
/* any new config errors? If so, return warning status. */
|
/* any new config errors? If so, return warning status. */
|
||||||
return (doc->optionErrors > opterrs ? 1 : 0);
|
return (doc->optionErrors > opterrs ? 1 : 0);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1345,6 +1345,7 @@ int TY_(DocParseStream)( TidyDocImpl* doc, StreamIn* in )
|
||||||
|
|
||||||
TY_(ResetTags)(doc); /* reset table to html5 mode */
|
TY_(ResetTags)(doc); /* reset table to html5 mode */
|
||||||
TY_(TakeConfigSnapshot)( doc ); /* Save config state */
|
TY_(TakeConfigSnapshot)( doc ); /* Save config state */
|
||||||
|
TY_(AdjustConfig)( doc ); /* ensure config consistency */
|
||||||
TY_(FreeAnchors)( doc );
|
TY_(FreeAnchors)( doc );
|
||||||
|
|
||||||
TY_(FreeNode)(doc, &doc->root);
|
TY_(FreeNode)(doc, &doc->root);
|
||||||
|
|
Loading…
Reference in a new issue