rprouse/guppi

Calendar events with brackets crash app

Opened this issue · 0 comments

Steps to reproduce

  1. Create an event in your calendar with a title [EXTERNAL] meeting for today
  2. Run guppy cal agenda

Crashes with the following because it interprets the [EXTERNAL] as a color directive.

Unhandled exception: System.InvalidOperationException: Could not find color or style 'EXTERNAL'.
   at Spectre.Console.StyleParser.Parse(String text) in /_/src/Spectre.Console/StyleParser.cs:line 10
   at Spectre.Console.MarkupParser.Parse(String text, Style style) in /_/src/Spectre.Console/Internal/Text/Markup/MarkupParser.cs:line 22
   at Spectre.Console.AnsiConsoleExtensions.Markup(IAnsiConsole console, String value) in /_/src/Spectre.Console/Extensions/AnsiConsoleExtensions.Markup.cs:line 77
   at Spectre.Console.AnsiConsoleExtensions.MarkupLine(IAnsiConsole console, String value) in /_/src/Spectre.Console/Extensions/AnsiConsoleExtensions.Markup.cs:line 117
   at Guppi.Console.Skills.CalendarSkill.Agenda(DateTime now, String title, Boolean markdown) in /home/runner/work/guppi/guppi/Guppi.Console/Skills/CalendarSkill.cs:line 0
   at Guppi.Console.Skills.CalendarSkill.<GetCommands>b__2_1(Boolean markdown) in /home/runner/work/guppi/guppi/Guppi.Console/Skills/CalendarSkill.cs:line 37