Skip to content

Commit

Permalink
Revert "Fix #1908: Add option to AddXmlDocumentationTransform to remo…
Browse files Browse the repository at this point in the history
…ve newlines in comments"

This reverts commit 1043924.
  • Loading branch information
siegfriedpammer committed Feb 1, 2020
1 parent d051e3a commit e0ee8bf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@
using System;
using System.IO;
using System.Linq;
using System.Reflection.Metadata;
using System.Xml;
using ICSharpCode.Decompiler.CSharp.Syntax;
using ICSharpCode.Decompiler.Documentation;
using ICSharpCode.Decompiler.TypeSystem;

namespace ICSharpCode.Decompiler.CSharp.Transforms
Expand All @@ -41,13 +43,6 @@ public void Run(AstNode rootNode, TransformContext context)
continue;
string doc = provider.GetDocumentation(entity);
if (doc != null) {
if (context.Settings.RemoveLineBreaksInXmlDocumentation) {
string[] lines = doc.Split(new[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries);
for (int i = 0; i < lines.Length; i++) {
lines[i] = lines[i].Trim();
}
doc = string.Join(" ", lines);
}
InsertXmlDocumentation(entityDecl, new StringReader(doc));
}
}
Expand Down
16 changes: 0 additions & 16 deletions ICSharpCode.Decompiler/DecompilerSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -722,22 +722,6 @@ public bool ShowXmlDocumentation {
}
}

bool removeLineBreaksInXmlDocumentation = false;

/// <summary>
/// Gets/Sets whether to remove line breaks from XML documentation comments.
/// </summary>
[Browsable(false)]
public bool RemoveLineBreaksInXmlDocumentation {
get { return removeLineBreaksInXmlDocumentation; }
set {
if (removeLineBreaksInXmlDocumentation != value) {
removeLineBreaksInXmlDocumentation = value;
OnPropertyChanged();
}
}
}

bool foldBraces = false;

[Browsable(false)]
Expand Down

0 comments on commit e0ee8bf

Please sign in to comment.