Markup parsing exception
See original GitHub issueInformation
- OS: Windows
- Version: 0.45
- Terminal: any
Describe the bug With version 0.44 the following worked:
new Markup("[white][[[/][white]]][/]")
With version 0.45 the code from above crashes with:
Unhandled exception. System.InvalidOperationException: Could not find color or style ‘white]’. 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.Markup…ctor(String text, Style style) in /_/src/Spectre.Console/Widgets/Markup.cs:line 42
Expected behavior The code working with 0.44 should also work with 0.45.
Issue Analytics
- State:
- Created a year ago
- Comments:7 (5 by maintainers)
Top Results From Across the Web
XamlParseException Class (System.Windows.Markup)
Represents the exception class for parser-specific exceptions from a WPF XAML parser. This exception is used in XAML API or WPF XAML parser...
Read more >WPF XAML Parse Exception?
The exact error is this: 'The invocation of the constructor on type 'MyApplication.MainWindow' that matches the specified binding constraints ...
Read more >markup syntax error throws parse exception, crashing ...
Any html markup error in the component causes the parser to throw a fatal error, which crashes webpack watch, necessitating a full restart...
Read more >ParseException (Java Platform SE 7 )
public class ParseException extends Exception. Signals that an error has been reached unexpectedly while parsing. See Also: Exception , Format ...
Read more >Markup Xaml Parse Exception - C#
My WPF project throws xamal parse exception when it is run. this exception is thrown from main window when InitializeComponent method is called ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@patriksvensson if you’re thinking about https://github.com/spectreconsole/spectre.console/pull/1027, that one is not merged. 😃
But that gives me the opportunity to add the above problem to the unit tests.
@patriksvensson You were right, I fixed it (well, in the PR). The problem above is precisely my first test case:
"[white][[[/][white]]][/]"
. I rebased the PR.