Browse Source

Revert "Fix #1908: Add option to AddXmlDocumentationTransform to remove newlines in comments"

This reverts commit 1043924366.
pull/1930/head
Siegfried Pammer 5 years ago
parent
commit
e0ee8bf286
  1. 9
      ICSharpCode.Decompiler/CSharp/Transforms/AddXmlDocumentationTransform.cs
  2. 16
      ICSharpCode.Decompiler/DecompilerSettings.cs

9
ICSharpCode.Decompiler/CSharp/Transforms/AddXmlDocumentationTransform.cs

@ -19,8 +19,10 @@ @@ -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
@ -41,13 +43,6 @@ namespace ICSharpCode.Decompiler.CSharp.Transforms @@ -41,13 +43,6 @@ namespace ICSharpCode.Decompiler.CSharp.Transforms
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));
}
}

16
ICSharpCode.Decompiler/DecompilerSettings.cs

@ -722,22 +722,6 @@ namespace ICSharpCode.Decompiler @@ -722,22 +722,6 @@ namespace ICSharpCode.Decompiler
}
}
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)]

Loading…
Cancel
Save