Skip to content

Docs generator producing bad line endings #5111

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 20, 2020
Merged
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
2 changes: 1 addition & 1 deletion src/DocGenerator/AsciiDoc/GeneratedAsciidocVisitor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ public override void VisitSource(Source source)

// Replace tabs with spaces and remove C# comment escaping from callouts
// (elastic docs generation does not like this callout format)
source.Text = Regex.Replace(source.Text.Replace("\t", " "), @"//[ \t]*\<(\d+)\>.*", "<$1>");
source.Text = Regex.Replace(source.Text.Replace("\t", " "), @"//[ \t]*\<(\d+)\>[^\r\n]*", "<$1>");

base.VisitSource(source);
}
Expand Down
2 changes: 1 addition & 1 deletion src/DocGenerator/Documentation/Blocks/CSharpBlock.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace DocGenerator.Documentation.Blocks
public class CSharpBlock : CodeBlock
{
private static readonly Regex Callout = new Regex(@"//[ \t]*(?<callout>\<\d+\>)[ \t]*(?<text>\S.*)", RegexOptions.Compiled);
private static readonly Regex CalloutReplacer = new Regex(@"//[ \t]*\<(\d+)\>.*", RegexOptions.Compiled);
private static readonly Regex CalloutReplacer = new Regex(@"//[ \t]*\<(\d+)\>[^\r\n]*", RegexOptions.Compiled);

public CSharpBlock(SyntaxNode node, int depth, string memberName = null)
: base(node.WithoutLeadingTrivia().ToFullStringWithoutPragmaWarningDirectiveTrivia(),
Expand Down