question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Markup parsing exception

See original GitHub issue

Information

  • 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:closed
  • Created a year ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
nils-acommented, Dec 1, 2022

@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.

0reactions
nils-acommented, Dec 1, 2022

@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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found