Fix indent-with-tabs for library use.
This commit is contained in:
parent
0706d195ef
commit
32ce272f75
|
@ -1229,10 +1229,8 @@ Bool ParseTabs( TidyDocImpl* doc, const TidyOptionImpl* entry )
|
|||
Bool tabs = flag != 0 ? yes : no;
|
||||
TY_(SetOptionBool)( doc, entry->id, tabs );
|
||||
if (tabs) {
|
||||
TY_(PPrintTabs)();
|
||||
TY_(SetOptionInt)( doc, TidyIndentSpaces, 1 );
|
||||
} else {
|
||||
TY_(PPrintSpaces)();
|
||||
/* optional - TY_(ResetOptionToDefault)( doc, TidyIndentSpaces ); */
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1809,8 +1809,14 @@ int tidyDocSaveStream( TidyDocImpl* doc, StreamOut* out )
|
|||
Bool asciiChars = cfgBool(doc, TidyAsciiChars);
|
||||
Bool makeBare = cfgBool(doc, TidyMakeBare);
|
||||
Bool escapeCDATA = cfgBool(doc, TidyEscapeCdata);
|
||||
Bool ppWithTabs = cfgBool(doc, TidyPPrintTabs);
|
||||
TidyAttrSortStrategy sortAttrStrat = cfg(doc, TidySortAttributes);
|
||||
|
||||
if (ppWithTabs)
|
||||
TY_(PPrintTabs)();
|
||||
else
|
||||
TY_(PPrintSpaces)();
|
||||
|
||||
if (escapeCDATA)
|
||||
TY_(ConvertCDATANodes)(doc, &doc->root);
|
||||
|
||||
|
|
Loading…
Reference in a new issue