Skip to content

Commit 86e62db

Browse files
committed
Remove unnecessary AdjustConfig logic.
1 parent 350f7b4 commit 86e62db

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

src/config.c

-4
Original file line numberDiff line numberDiff line change
@@ -619,7 +619,6 @@ void TY_(TakeConfigSnapshot)( TidyDocImpl* doc )
619619
const TidyOptionValue* value = &doc->config.value[ 0 ];
620620
TidyOptionValue* snap = &doc->config.snapshot[ 0 ];
621621

622-
TY_(AdjustConfig)( doc ); /* Make sure it's consistent */
623622
for ( ixVal=0; ixVal < N_TIDY_OPTIONS; ++option, ++ixVal )
624623
{
625624
assert( ixVal == (uint) option->id );
@@ -668,7 +667,6 @@ void TY_(CopyConfig)( TidyDocImpl* docTo, TidyDocImpl* docFrom )
668667
}
669668
if ( needReparseTagsDecls )
670669
ReparseTagDecls( docTo, changedUserTags );
671-
TY_(AdjustConfig)( docTo ); /* Make sure it's consistent */
672670
}
673671
}
674672

@@ -962,8 +960,6 @@ int TY_(ParseConfigFileEnc)( TidyDocImpl* doc, ctmbstr file, ctmbstr charenc )
962960
if ( fname != (tmbstr) file )
963961
TidyDocFree( doc, fname );
964962

965-
TY_(AdjustConfig)( doc );
966-
967963
/* any new config errors? If so, return warning status. */
968964
return (doc->optionErrors > opterrs ? 1 : 0);
969965
}

src/tidylib.c

+1
Original file line numberDiff line numberDiff line change
@@ -1345,6 +1345,7 @@ int TY_(DocParseStream)( TidyDocImpl* doc, StreamIn* in )
13451345

13461346
TY_(ResetTags)(doc); /* reset table to html5 mode */
13471347
TY_(TakeConfigSnapshot)( doc ); /* Save config state */
1348+
TY_(AdjustConfig)( doc ); /* ensure config consistency */
13481349
TY_(FreeAnchors)( doc );
13491350

13501351
TY_(FreeNode)(doc, &doc->root);

0 commit comments

Comments
 (0)