Skip to content
Permalink
Browse files

Revert "Fix #1908: Add option to AddXmlDocumentationTransform to remo…

…ve newlines in comments"

This reverts commit 1043924.
  • Loading branch information
siegfriedpammer committed Feb 1, 2020
1 parent d051e3a commit e0ee8bf286f23315ad7345f83f460e7f11741df4
@@ -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 @@ 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));
}
}
@@ -722,22 +722,6 @@ public bool ArrayInitializers
}
}

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)]

0 comments on commit e0ee8bf

Please sign in to comment.
You can’t perform that action at this time.