Issue #65 - effect name change to skip-nested, and default to on

This commit is contained in:
Geoff McLane 2015-11-05 15:19:39 +01:00
parent 99ae402b02
commit 800b91e576
4 changed files with 4 additions and 4 deletions

View file

@ -205,7 +205,7 @@ typedef enum
TidyMergeSpans, /**< Merge multiple SPANs */ TidyMergeSpans, /**< Merge multiple SPANs */
TidyAnchorAsName, /**< Define anchors as name attributes */ TidyAnchorAsName, /**< Define anchors as name attributes */
TidyPPrintTabs, /**< Indent using tabs istead of spaces */ TidyPPrintTabs, /**< Indent using tabs istead of spaces */
TidySkipQuotes, /**< Skip quotes and comments in script CDATA */ TidySkipNested, /**< Skip nested tags in script and style CDATA */
N_TIDY_OPTIONS /**< Must be last */ N_TIDY_OPTIONS /**< Must be last */
} TidyOptionId; } TidyOptionId;

View file

@ -321,7 +321,7 @@ static const TidyOptionImpl option_defs[] =
{ TidyMergeSpans, MU, "merge-spans", IN, TidyAutoState, ParseAutoBool, autoBoolPicks }, { TidyMergeSpans, MU, "merge-spans", IN, TidyAutoState, ParseAutoBool, autoBoolPicks },
{ TidyAnchorAsName, MU, "anchor-as-name", BL, yes, ParseBool, boolPicks }, { TidyAnchorAsName, MU, "anchor-as-name", BL, yes, ParseBool, boolPicks },
{ TidyPPrintTabs, PP, "indent-with-tabs", BL, no, ParseTabs, boolPicks }, /* 20150515 - Issue #108 */ { TidyPPrintTabs, PP, "indent-with-tabs", BL, no, ParseTabs, boolPicks }, /* 20150515 - Issue #108 */
{ TidySkipQuotes, MU, "skip-quotes", BL, no, ParseBool, boolPicks }, /* 1642186 - Issue #65 */ { TidySkipNested, MU, "skip-nested", BL, yes, ParseBool, boolPicks }, /* 1642186 - Issue #65 */
{ N_TIDY_OPTIONS, XX, NULL, XY, 0, NULL, NULL } { N_TIDY_OPTIONS, XX, NULL, XY, 0, NULL, NULL }
}; };

View file

@ -2008,7 +2008,7 @@ static Node *GetCDATA( TidyDocImpl* doc, Node *container )
* If yes, then avoid incrementing nested... * If yes, then avoid incrementing nested...
\*/ \*/
Bool nonested = ((nodeIsSCRIPT(container) || (nodeIsSTYLE(container))) && Bool nonested = ((nodeIsSCRIPT(container) || (nodeIsSTYLE(container))) &&
cfgBool(doc, TidySkipQuotes)) ? yes : no; cfgBool(doc, TidySkipNested)) ? yes : no;
SetLexerLocus( doc, lexer ); SetLexerLocus( doc, lexer );
lexer->waswhite = no; lexer->waswhite = no;

View file

@ -1097,7 +1097,7 @@ static const TidyOptionDoc option_docs[] =
"Note <code>tab-size</code> controls converting input tabs to spaces. Set " "Note <code>tab-size</code> controls converting input tabs to spaces. Set "
"it to zero to retain input tabs. " "it to zero to retain input tabs. "
}, },
{TidySkipQuotes, {TidySkipNested,
"This option specifies that Tidy should skip nested tags when parsing " "This option specifies that Tidy should skip nested tags when parsing "
"script and style data. " "script and style data. "
}, },