Skip to content

Commit

Permalink
fixed css #189
Browse files Browse the repository at this point in the history
  • Loading branch information
trullock committed Jan 14, 2022
1 parent ce9f14b commit 9ec413f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 0 additions & 1 deletion src/NUglify.Tests/Css/Bugs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ public void Bug189()
{
TestHelper.Instance.RunTest("-lines:m -comments:all");
}

[Test]
public void Bug270()
{
Expand Down
2 changes: 2 additions & 0 deletions src/NUglify/Css/CssParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3923,6 +3923,8 @@ string NextSignificantToken()

// add the comment to the builder
sb.Append(commentText);
if(Settings.OutputMode == OutputMode.MultipleLines)
sb.Append(Settings.LineTerminator);
}
}

Expand Down
6 changes: 3 additions & 3 deletions src/NUglify/JavaScript/CodeSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public CodeSettings()
this.EvalTreatment = EvalTreatment.Ignore;
this.InlineSafeStrings = true;
this.MacSafariQuirks = true;
this.CommentMode = JsComment.Important;
this.CommentMode = JsComment.PreserveImportant;
this.QuoteObjectLiteralProperties = false;
this.StrictMode = false;
this.StripDebugStatements = true;
Expand Down Expand Up @@ -745,8 +745,8 @@ public bool PreserveFunctionNames
[Obsolete("Use CommentMode instead")]
public bool PreserveImportantComments
{
get => this.CommentMode != JsComment.None;
set => this.CommentMode = this.CommentMode == JsComment.None ? JsComment.Important : this.CommentMode;
get => this.CommentMode != JsComment.PreserveNone;
set => this.CommentMode = this.CommentMode == JsComment.PreserveNone ? JsComment.PreserveImportant : this.CommentMode;
}

/// <summary>
Expand Down

0 comments on commit 9ec413f

Please sign in to comment.