Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions include/tidyenum.h
Original file line number Diff line number Diff line change
Expand Up @@ -652,6 +652,7 @@ typedef enum
TidyUpperCaseTags, /**< Output tags in upper not lower case */
TidyUseCustomTags, /**< Enable Tidy to use autonomous custom tags */
TidyVertSpace, /**< degree to which markup is spread out vertically */
TidyScriptNoFirstBlankLine, /**< Control blank line insertion after <script> tags */
TidyWarnPropAttrs, /**< Warns on proprietary attributes */
TidyWord2000, /**< Draconian cleaning for Word2000 */
TidyWrapAsp, /**< Wrap within ASP pseudo elements */
Expand Down
1 change: 1 addition & 0 deletions src/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@ static const TidyOptionImpl option_defs[] =
{ TidyUpperCaseTags, MR, "uppercase-tags", BL, no, ParsePickList, &boolPicks },
{ TidyUseCustomTags, MR, "custom-tags", IN, TidyCustomNo, ParsePickList, &customTagsPicks }, /* 20170309 - Issue #119 */
{ TidyVertSpace, PP, "vertical-space", IN, no, ParsePickList, &autoBoolPicks }, /* #228 - tri option */
{ TidyScriptNoFirstBlankLine, PP, "script-no-first-blank-line", BL, no, ParsePickList, &boolPicks },
{ TidyWarnPropAttrs, DG, "warn-proprietary-attributes", BL, yes, ParsePickList, &boolPicks },
{ TidyWord2000, MC, "word-2000", BL, no, ParsePickList, &boolPicks },
{ TidyWrapAsp, PP, "wrap-asp", BL, yes, ParsePickList, &boolPicks },
Expand Down
18 changes: 18 additions & 0 deletions src/language_en.h
Original file line number Diff line number Diff line change
Expand Up @@ -1398,6 +1398,24 @@ static languageDefinition language_en = { whichPluralForm_en, {
"If set to <var>auto</var> Tidy will eliminate nearly all newline "
"characters."
},
{/* 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. */
TidyScriptNoFirstBlankLine, 0,
"This option controls whether Tidy adds a single blank line after the "
"<code>&lt;script&gt;</code> opening tag for readability. "
"<br/>"
"The default is <var>no</var>, which adds a single blank line after "
"the <code>&lt;script&gt;</code> tag. "
"<br/>"
"If set to <var>yes</var>, Tidy will suppress the blank line immediately "
"after the <code>&lt;script&gt;</code> tag."
},
{/* Important notes for translators:
- Use only <code></code>, <var></var>, <em></em>, <strong></strong>, and
<br/>.
Expand Down
3 changes: 3 additions & 0 deletions src/pprint.c
Original file line number Diff line number Diff line change
Expand Up @@ -2139,7 +2139,10 @@ static void PPrintScriptStyle( TidyDocImpl* doc, uint mode, uint indent, Node *n
In this case we don't want to flush the line, preferring to keep the required
closing SCRIPT tag on the same line. */
if ( node->content != NULL )
{
if (!cfgBool(doc, TidyScriptNoFirstBlankLine))
PFlushLineSmart(doc, indent);
}

if ( xhtmlOut && node->content != NULL )
{
Expand Down