Skip to content

Commit

Permalink
Replace chars in ToString output so they don't produce markup formatt…
Browse files Browse the repository at this point in the history
…ing (#207)

***NO_CI***
  • Loading branch information
josesimoes authored Jul 30, 2019
1 parent b175728 commit a2a77ad
Showing 1 changed file with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ public static string ToStringForOutput(this List<Commands.Monitor_MemoryMap.Rang
if (range != null && range.Count > 0)
{
// header
output.AppendLine("--------------------------------");
output.AppendLine(":: Memory Map ::");
output.AppendLine("--------------------------------");
output.AppendLine("++++++++++++++++++++++++++++++++");
output.AppendLine("++ Memory Map ++");
output.AppendLine("++++++++++++++++++++++++++++++++");
output.AppendLine(" Type Start Size");
output.AppendLine("--------------------------------");
output.AppendLine("++++++++++++++++++++++++++++++++");

foreach (Commands.Monitor_MemoryMap.Range item in range)
{
Expand Down Expand Up @@ -72,13 +72,13 @@ public static string ToStringForOutput(this List<Commands.Monitor_FlashSectorMap
if (range != null && range.Count > 0)
{
// header
output.AppendLine("---------------------------------------------------------------");
output.AppendLine(":: Flash Sector Map ::");
output.AppendLine("---------------------------------------------------------------");
output.AppendLine("+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++");
output.AppendLine("++ Flash Sector Map ++");
output.AppendLine("+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++");

// output in list format, ordered by region
output.AppendLine(" Region Start Blocks Bytes/Block Usage");
output.AppendLine("---------------------------------------------------------------");
output.AppendLine("+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++");

int i = 0;

Expand All @@ -91,14 +91,14 @@ public static string ToStringForOutput(this List<Commands.Monitor_FlashSectorMap
output.AppendLine();

// header
output.AppendLine("---------------------------------------------------");
output.AppendLine(":: Storage Usage Map ::");
output.AppendLine("---------------------------------------------------");
output.AppendLine("+++++++++++++++++++++++++++++++++++++++++++++++++++");
output.AppendLine("++ Storage Usage Map ++");
output.AppendLine("+++++++++++++++++++++++++++++++++++++++++++++++++++");

// output in list format, ordered by deployment usage

output.AppendLine(" Start Size (kB) Usage");
output.AppendLine("---------------------------------------------------");
output.AppendLine("+++++++++++++++++++++++++++++++++++++++++++++++++++");

// output nanoBooter, only if it's available on the target
if (range.Exists(item => (item.m_flags & Commands.Monitor_FlashSectorMap.c_MEMORY_USAGE_MASK) == Commands.Monitor_FlashSectorMap.c_MEMORY_USAGE_BOOTSTRAP))
Expand Down Expand Up @@ -184,7 +184,7 @@ public static string ToStringForOutput(this DeviceConfiguration.NetworkConfigura
if (networkConfiguration.StartupAddressMode != AddressMode.Invalid)
{
output.AppendLine("IPv4 configuration");
output.AppendLine("------------------------------------");
output.AppendLine("++++++++++++++++++++++++++++++++++++");
output.AppendLine($"address: {networkConfiguration.IPv4Address.ToString()}");
output.AppendLine($"subnet mask: {networkConfiguration.IPv4NetMask.ToString()}");
output.AppendLine($"gateway: {networkConfiguration.IPv4GatewayAddress.ToString()}");
Expand All @@ -193,7 +193,7 @@ public static string ToStringForOutput(this DeviceConfiguration.NetworkConfigura

output.AppendLine("");
output.AppendLine("IPv6 configuration");
output.AppendLine("------------------------------------");
output.AppendLine("++++++++++++++++++++++++++++++++++++");
output.AppendLine($"address: {networkConfiguration.IPv6Address.ToString()}");
output.AppendLine($"subnet mask: {networkConfiguration.IPv6NetMask.ToString()}");
output.AppendLine($"gateway: {networkConfiguration.IPv6GatewayAddress.ToString()}");
Expand Down

0 comments on commit a2a77ad

Please sign in to comment.