on-internet
← Community

Parse markdown indented code block gets stuck in recursion

Stack Overflow ·

I am trying to parse Markdown using a grammar written with Parslet. However, I cannot get past indented code blocks because everything I tried so far got stuck in recursion. They look like this: This is a indented code block. Second line. Code block continues after blank line. There can be any number of chunks, separated by not more than one blank line. In order to solve this I wrote a minimal example which replaces the lines (including \n) with a and blank lines (\n\n) with spaces, eg: a aaa aa. # recurring_group_parser.rb require 'parslet' require 'rspec' require 'parslet/rig/rspec' class Re

Comments

Sign in or sign up to comment and upvote.

No comments yet.