Skip to content

Commit

Permalink
Fixed ansi replacement for variables in pages for platforms without ansi
Browse files Browse the repository at this point in the history
support
  • Loading branch information
principis committed Nov 23, 2019
1 parent 3fb513f commit f6ff7bd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tldr-sharp/Page.cs
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ internal static int Render(string path, string diffPlatform = null)
internal static string ParseLine(string line, bool formatted = false)
{
if (line.Contains("{{")) {
line = line.Replace("{{", Ansi.Green).Replace("}}", Ansi.Red);
line = line.Replace("{{", Program.AnsiSupport ? Ansi.Green : "").Replace("}}", Program.AnsiSupport ? Ansi.Red : "");
}

int urlStart = line.IndexOf("<", StringComparison.Ordinal);
Expand Down

0 comments on commit f6ff7bd

Please sign in to comment.