-
Notifications
You must be signed in to change notification settings - Fork 30
Markdown parsing error: bold syntax ** fails when preceded by a closing parenthesis ) #129
Description
Short description
When bold syntax **text** is immediately preceded by a closing parenthesis ) (e.g., in scenarios where stock tickers are displayed in parentheses), flutter_markdown_plus fails to parse the bold formatting correctly. The text is rendered as plain text instead of bold.
Example code
final markdown = '''
For example, "fast food giant **McDonald's Corporation(NYSE: MCD)** and **Restaurant Brands International(NYSE: QSR)** front"
''';
MarkdownPlus(data: markdown);Expected behavior
Both "McDonald's Corporation (NYSE: MCD)" and "Restaurant Brands International (NYSE: QSR)" should be displayed in bold.
Actual behavior
The bold formatting is not applied; the text is rendered as plain text. This appears to be caused by the ) character immediately before the ** delimiter, which may interfere with the markdown parser's boundary detection.
Environment
- Flutter version:
3.35.1 flutter_markdown_plusversion:^1.0.7- Platform: iOS / Android / Web (tested on all)
Additional context
When the ) before ** is removed or replaced with another character, the bold formatting works as expected. This suggests the parser may not correctly handle special characters adjacent to markdown syntax delimiters.
Steps to reproduce
- Create a markdown string with the pattern
)**bold text**; - Render it using the
MarkdownPluswidget; - Observe that the bold styling is not applied.