Removed TidyDropFontTags. Note that POs and POT were _not_ updated.
This commit is contained in:
parent
24afc6a6fa
commit
d1e0b22be7
|
@ -553,7 +553,6 @@ typedef enum
|
||||||
#endif
|
#endif
|
||||||
TidyDropEmptyElems, /**< Discard empty elements */
|
TidyDropEmptyElems, /**< Discard empty elements */
|
||||||
TidyDropEmptyParas, /**< Discard empty p elements */
|
TidyDropEmptyParas, /**< Discard empty p elements */
|
||||||
TidyDropFontTags, /**< Discard presentation tags */
|
|
||||||
TidyDropPropAttrs, /**< Discard proprietary attributes */
|
TidyDropPropAttrs, /**< Discard proprietary attributes */
|
||||||
TidyDuplicateAttrs, /**< Keep first or last duplicate attribute */
|
TidyDuplicateAttrs, /**< Keep first or last duplicate attribute */
|
||||||
TidyEmacs, /**< If true, format error output for GNU Emacs */
|
TidyEmacs, /**< If true, format error output for GNU Emacs */
|
||||||
|
|
35
src/clean.c
35
src/clean.c
|
@ -1007,35 +1007,6 @@ static Bool Center2Div( TidyDocImpl* doc, Node *node, Node **pnode)
|
||||||
{
|
{
|
||||||
if ( nodeIsCENTER(node) )
|
if ( nodeIsCENTER(node) )
|
||||||
{
|
{
|
||||||
#if 0 /* 00000000 what is this doing inside an nodeIsCENTER(node)??? 0000000 */
|
|
||||||
if ( cfgBool(doc, TidyDropFontTags) )
|
|
||||||
{
|
|
||||||
if (node->content)
|
|
||||||
{
|
|
||||||
Node *last = node->last;
|
|
||||||
DiscardContainer( doc, node, pnode );
|
|
||||||
|
|
||||||
node = TY_(InferredTag)(doc, TidyTag_BR);
|
|
||||||
TY_(InsertNodeAfterElement)(last, node);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Node *prev = node->prev, *next = node->next,
|
|
||||||
*parent = node->parent;
|
|
||||||
DiscardContainer( doc, node, pnode );
|
|
||||||
|
|
||||||
node = TY_(InferredTag)(doc, TidyTag_BR);
|
|
||||||
if (next)
|
|
||||||
TY_(InsertNodeBeforeElement)(next, node);
|
|
||||||
else if (prev)
|
|
||||||
TY_(InsertNodeAfterElement)(prev, node);
|
|
||||||
else
|
|
||||||
TY_(InsertNodeAtStart)(parent, node);
|
|
||||||
}
|
|
||||||
|
|
||||||
return yes;
|
|
||||||
}
|
|
||||||
#endif /* 00000000 what is this doing inside an nodeIsCENTER(node)??? 0000000 */
|
|
||||||
RenameElem( doc, node, TidyTag_DIV );
|
RenameElem( doc, node, TidyTag_DIV );
|
||||||
TY_(AddStyleProperty)( doc, node, "text-align: center" );
|
TY_(AddStyleProperty)( doc, node, "text-align: center" );
|
||||||
return yes;
|
return yes;
|
||||||
|
@ -1394,12 +1365,6 @@ static Bool Font2Span( TidyDocImpl* doc, Node *node, Node **pnode )
|
||||||
|
|
||||||
if ( nodeIsFONT(node) )
|
if ( nodeIsFONT(node) )
|
||||||
{
|
{
|
||||||
if ( cfgBool(doc, TidyDropFontTags) )
|
|
||||||
{
|
|
||||||
DiscardContainer( doc, node, pnode );
|
|
||||||
return yes;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* if node is the only child of parent element then leave alone
|
/* if node is the only child of parent element then leave alone
|
||||||
Do so only if BlockStyle may be succesful. */
|
Do so only if BlockStyle may be succesful. */
|
||||||
if ( node->parent->content == node && node->next == NULL &&
|
if ( node->parent->content == node && node->next == NULL &&
|
||||||
|
|
|
@ -249,7 +249,6 @@ static const TidyOptionImpl option_defs[] =
|
||||||
#endif
|
#endif
|
||||||
{ TidyDropEmptyElems, MU, "drop-empty-elements", BL, yes, ParseBool, boolPicks },
|
{ TidyDropEmptyElems, MU, "drop-empty-elements", BL, yes, ParseBool, boolPicks },
|
||||||
{ TidyDropEmptyParas, MU, "drop-empty-paras", BL, yes, ParseBool, boolPicks },
|
{ TidyDropEmptyParas, MU, "drop-empty-paras", BL, yes, ParseBool, boolPicks },
|
||||||
{ TidyDropFontTags, MU, "drop-font-tags", BL, no, ParseBool, boolPicks },
|
|
||||||
{ TidyDropPropAttrs, MU, "drop-proprietary-attributes", BL, no, ParseBool, boolPicks },
|
{ TidyDropPropAttrs, MU, "drop-proprietary-attributes", BL, no, ParseBool, boolPicks },
|
||||||
{ TidyDuplicateAttrs, MU, "repeated-attributes", IN, TidyKeepLast, ParseRepeatAttr, repeatAttrPicks },
|
{ TidyDuplicateAttrs, MU, "repeated-attributes", IN, TidyKeepLast, ParseRepeatAttr, repeatAttrPicks },
|
||||||
{ TidyEmacs, MS, "gnu-emacs", BL, no, ParseBool, boolPicks },
|
{ TidyEmacs, MS, "gnu-emacs", BL, no, ParseBool, boolPicks },
|
||||||
|
|
|
@ -330,30 +330,6 @@ static languageDefinition language_en = { whichPluralForm_en, {
|
||||||
TidyDropEmptyParas, 0,
|
TidyDropEmptyParas, 0,
|
||||||
"This option specifies if Tidy should discard empty paragraphs. "
|
"This option specifies if Tidy should discard empty paragraphs. "
|
||||||
},
|
},
|
||||||
{/* 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. */
|
|
||||||
TidyDropFontTags, 0,
|
|
||||||
"Deprecated; <em>do not use</em>. This option is destructive to "
|
|
||||||
"<code><font></code> tags, and it will be removed from future "
|
|
||||||
"versions of Tidy. Use the <code>clean</code> option instead. "
|
|
||||||
"<br/>"
|
|
||||||
"If you do set this option despite the warning it will perform "
|
|
||||||
"as <code>clean</code> except styles will be inline instead of put into "
|
|
||||||
"a CSS class. <code><font></code> tags will be dropped completely "
|
|
||||||
"and their styles will not be preserved. "
|
|
||||||
"<br/>"
|
|
||||||
"If both <code>clean</code> and this option are enabled, "
|
|
||||||
"<code><font></code> tags will still be dropped completely, and "
|
|
||||||
"other styles will be preserved in a CSS class instead of inline. "
|
|
||||||
"<br/>"
|
|
||||||
"See <code>clean</code> for more information. "
|
|
||||||
},
|
|
||||||
{/* 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/>.
|
||||||
|
|
|
@ -1973,7 +1973,6 @@ int tidyDocCleanAndRepair( TidyDocImpl* doc )
|
||||||
Bool logical = cfgBool( doc, TidyLogicalEmphasis );
|
Bool logical = cfgBool( doc, TidyLogicalEmphasis );
|
||||||
Bool clean = cfgBool( doc, TidyMakeClean );
|
Bool clean = cfgBool( doc, TidyMakeClean );
|
||||||
Bool gdoc = cfgBool( doc, TidyGDocClean );
|
Bool gdoc = cfgBool( doc, TidyGDocClean );
|
||||||
Bool dropFont = cfgBool( doc, TidyDropFontTags );
|
|
||||||
Bool htmlOut = cfgBool( doc, TidyHtmlOut );
|
Bool htmlOut = cfgBool( doc, TidyHtmlOut );
|
||||||
Bool xmlOut = cfgBool( doc, TidyXmlOut );
|
Bool xmlOut = cfgBool( doc, TidyXmlOut );
|
||||||
Bool xhtmlOut = cfgBool( doc, TidyXhtmlOut );
|
Bool xhtmlOut = cfgBool( doc, TidyXhtmlOut );
|
||||||
|
@ -2014,7 +2013,7 @@ int tidyDocCleanAndRepair( TidyDocImpl* doc )
|
||||||
}
|
}
|
||||||
|
|
||||||
/* replaces presentational markup by style rules */
|
/* replaces presentational markup by style rules */
|
||||||
if ( clean || dropFont )
|
if ( clean )
|
||||||
TY_(CleanDocument)( doc );
|
TY_(CleanDocument)( doc );
|
||||||
|
|
||||||
/* clean up html exported by Google Docs */
|
/* clean up html exported by Google Docs */
|
||||||
|
|
Loading…
Reference in a new issue