WIP
This commit is contained in:
parent
d1e0b22be7
commit
49b833f63b
|
@ -2261,12 +2261,6 @@ int main( int argc, char** argv )
|
||||||
tidyOptResetToDefault( tdoc, TidyIndentSpaces );
|
tidyOptResetToDefault( tdoc, TidyIndentSpaces );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/* Usurp -o for output file. Anyone hiding end tags?
|
|
||||||
case 'o':
|
|
||||||
tidyOptSetBool( tdoc, TidyHideEndTags, yes );
|
|
||||||
break;
|
|
||||||
*/
|
|
||||||
|
|
||||||
case 'u':
|
case 'u':
|
||||||
tidyOptSetBool( tdoc, TidyUpperCaseTags, yes );
|
tidyOptSetBool( tdoc, TidyUpperCaseTags, yes );
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -571,7 +571,6 @@ typedef enum
|
||||||
TidyForceOutput, /**< Output document even if errors were found */
|
TidyForceOutput, /**< Output document even if errors were found */
|
||||||
TidyGDocClean, /**< Clean up HTML exported from Google Docs */
|
TidyGDocClean, /**< Clean up HTML exported from Google Docs */
|
||||||
TidyHideComments, /**< Hides all (real) comments in output */
|
TidyHideComments, /**< Hides all (real) comments in output */
|
||||||
TidyHideEndTags, /**< Legacy name for TidyOmitOptionalTags */
|
|
||||||
TidyHtmlOut, /**< Output plain HTML, even for XHTML input.*/
|
TidyHtmlOut, /**< Output plain HTML, even for XHTML input.*/
|
||||||
TidyInCharEncoding, /**< Input character encoding (if different) */
|
TidyInCharEncoding, /**< Input character encoding (if different) */
|
||||||
TidyIndentAttributes, /**< Newline+indent before each attribute */
|
TidyIndentAttributes, /**< Newline+indent before each attribute */
|
||||||
|
|
|
@ -267,7 +267,6 @@ static const TidyOptionImpl option_defs[] =
|
||||||
{ TidyForceOutput, MS, "force-output", BL, no, ParseBool, boolPicks },
|
{ TidyForceOutput, MS, "force-output", BL, no, ParseBool, boolPicks },
|
||||||
{ TidyGDocClean, MU, "gdoc", BL, no, ParseBool, boolPicks },
|
{ TidyGDocClean, MU, "gdoc", BL, no, ParseBool, boolPicks },
|
||||||
{ TidyHideComments, MU, "hide-comments", BL, no, ParseBool, boolPicks },
|
{ TidyHideComments, MU, "hide-comments", BL, no, ParseBool, boolPicks },
|
||||||
{ TidyHideEndTags, MU, "hide-endtags", BL, no, ParseBool, boolPicks },
|
|
||||||
{ TidyHtmlOut, MU, "output-html", BL, no, ParseBool, boolPicks },
|
{ TidyHtmlOut, MU, "output-html", BL, no, ParseBool, boolPicks },
|
||||||
{ TidyInCharEncoding, CE, "input-encoding", IN, UTF8, ParseCharEnc, charEncPicks },
|
{ TidyInCharEncoding, CE, "input-encoding", IN, UTF8, ParseCharEnc, charEncPicks },
|
||||||
{ TidyIndentAttributes, PP, "indent-attributes", BL, no, ParseBool, boolPicks },
|
{ TidyIndentAttributes, PP, "indent-attributes", BL, no, ParseBool, boolPicks },
|
||||||
|
@ -1095,7 +1094,7 @@ void AdjustConfig( TidyDocImpl* doc )
|
||||||
TY_(SetOptionInt)( doc, TidyOutputBOM, yes );
|
TY_(SetOptionInt)( doc, TidyOutputBOM, yes );
|
||||||
#endif
|
#endif
|
||||||
TY_(SetOptionBool)( doc, TidyQuoteAmpersand, yes );
|
TY_(SetOptionBool)( doc, TidyQuoteAmpersand, yes );
|
||||||
TY_(SetOptionBool)( doc, TidyHideEndTags, no );
|
TY_(SetOptionBool)( doc, TidyOmitOptionalTags, no );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -533,17 +533,6 @@ static languageDefinition language_en = { whichPluralForm_en, {
|
||||||
TidyHideComments, 0,
|
TidyHideComments, 0,
|
||||||
"This option specifies if Tidy should print out comments. "
|
"This option specifies if Tidy should print out comments. "
|
||||||
},
|
},
|
||||||
{/* Important notes for translators:
|
|
||||||
- Use only <code></code>, <var></var>, <em></em>, <strong></strong>, and
|
|
||||||
<br/>.
|
|
||||||
- Entities, tags, attributes, etc., should be enclosed in <code></code>.
|
|
||||||
- Option values should be enclosed in <var></var>.
|
|
||||||
- It's very important that <br/> be self-closing!
|
|
||||||
- The strings "Tidy" and "HTML Tidy" are the program name and must not
|
|
||||||
be translated. */
|
|
||||||
TidyHideEndTags, 0,
|
|
||||||
"This option is an alias for <code>omit-optional-tags</code>. "
|
|
||||||
},
|
|
||||||
{/* Important notes for translators:
|
{/* Important notes for translators:
|
||||||
- Use only <code></code>, <var></var>, <em></em>, <strong></strong>, and
|
- Use only <code></code>, <var></var>, <em></em>, <strong></strong>, and
|
||||||
<br/>.
|
<br/>.
|
||||||
|
|
|
@ -789,9 +789,8 @@ static void PCondFlushLineSmart( TidyDocImpl* doc, uint indent )
|
||||||
|
|
||||||
/*\
|
/*\
|
||||||
* Issue #390 - Must still deal with fixing indent!
|
* Issue #390 - Must still deal with fixing indent!
|
||||||
* If TidyHideEndTags or TidyOmitOptionalTags, then
|
* If TidyOmitOptionalTags, then in cerain circumstances no PrintEndTag
|
||||||
* in certain circumstance no PrintEndTag will be done,
|
* will be done, so linelen will be 0...
|
||||||
* so linelen will be 0...
|
|
||||||
\*/
|
\*/
|
||||||
if (pprint->indent[ 0 ].spaces != (int)indent)
|
if (pprint->indent[ 0 ].spaces != (int)indent)
|
||||||
{
|
{
|
||||||
|
@ -2340,8 +2339,7 @@ void TY_(PPrintTree)( TidyDocImpl* doc, uint mode, uint indent, Node *node )
|
||||||
{
|
{
|
||||||
Bool indcont = ( cfgAutoBool(doc, TidyIndentContent) != TidyNoState );
|
Bool indcont = ( cfgAutoBool(doc, TidyIndentContent) != TidyNoState );
|
||||||
Bool indsmart = ( cfgAutoBool(doc, TidyIndentContent) == TidyAutoState );
|
Bool indsmart = ( cfgAutoBool(doc, TidyIndentContent) == TidyAutoState );
|
||||||
Bool hideend = cfgBool( doc, TidyHideEndTags ) ||
|
Bool hideend = cfgBool( doc, TidyOmitOptionalTags );
|
||||||
cfgBool( doc, TidyOmitOptionalTags );
|
|
||||||
Bool classic = TidyClassicVS; /* #228 - cfgBool( doc, TidyVertSpace ); */
|
Bool classic = TidyClassicVS; /* #228 - cfgBool( doc, TidyVertSpace ); */
|
||||||
uint contentIndent = indent;
|
uint contentIndent = indent;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue