Double dollar ($$) parsing issue #105

Open
opened 2026-01-29 14:27:09 +00:00 by claunia · 0 comments
Owner

Originally created by @BOT-Man-JL on GitHub (Apr 11, 2017).

Moved from: https://github.com/madskristensen/MarkdownEditor/issues/105

Description

Text after double dollar $$ (math TeX code) can not be parsed.

Recreating this Issue

Input $$ haha and the parser throws an exception:

2017/4/10 17:01:38: Unexpected error occurred while parsing. Please log an issue to https://github.com/madskristensen/MarkdownEditor/issues Reason: System.IndexOutOfRangeException: Index was outside the bounds of the array.
   at Markdig.Parsers.FencedBlockParserBase`1.DefaultInfoParser(BlockProcessor state, StringSlice& line, IFencedBlock fenced)
   at Markdig.Parsers.FencedBlockParserBase`1.TryOpen(BlockProcessor processor)
   at Markdig.Parsers.BlockProcessor.TryOpenBlocks(BlockParser[] parsers)
   at Markdig.Parsers.BlockProcessor.TryOpenBlocks()
   at Markdig.Parsers.BlockProcessor.ProcessLine(StringSlice newLine)
   at Markdig.Parsers.MarkdownParser.ProcessBlocks()
   at Markdig.Parsers.MarkdownParser.Parse()
   at Markdig.Parsers.MarkdownParser.Parse(String text, MarkdownPipeline pipeline)
   at Markdig.Markdown.Parse(String markdown, MarkdownPipeline pipeline)
Originally created by @BOT-Man-JL on GitHub (Apr 11, 2017). Moved from: https://github.com/madskristensen/MarkdownEditor/issues/105 ## Description Text after double dollar `$$` (math TeX code) can not be parsed. ## Recreating this Issue Input `$$ haha ` and the parser throws an exception: ``` 2017/4/10 17:01:38: Unexpected error occurred while parsing. Please log an issue to https://github.com/madskristensen/MarkdownEditor/issues Reason: System.IndexOutOfRangeException: Index was outside the bounds of the array. at Markdig.Parsers.FencedBlockParserBase`1.DefaultInfoParser(BlockProcessor state, StringSlice& line, IFencedBlock fenced) at Markdig.Parsers.FencedBlockParserBase`1.TryOpen(BlockProcessor processor) at Markdig.Parsers.BlockProcessor.TryOpenBlocks(BlockParser[] parsers) at Markdig.Parsers.BlockProcessor.TryOpenBlocks() at Markdig.Parsers.BlockProcessor.ProcessLine(StringSlice newLine) at Markdig.Parsers.MarkdownParser.ProcessBlocks() at Markdig.Parsers.MarkdownParser.Parse() at Markdig.Parsers.MarkdownParser.Parse(String text, MarkdownPipeline pipeline) at Markdig.Markdown.Parse(String markdown, MarkdownPipeline pipeline) ```
claunia added the bug label 2026-01-29 14:27:09 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/markdig#105