I'd like to parse Markdown that is separated by # (single hash).
I've been try to that with Ruby.
Below code outputs ["# Bob's markdown header 1\n\nsomething here.\n\n", "#", "# kitty's header 1\n\nmeow.\n\n"]
p \
arrayobj = <<-EOS.scan(/^#[^#]*/m)
# Bob's markdown header 1
something here.
## this is markdown header 2
yeah.
# kitty's header 1
meow.
EOS
However what I wanted is below.
["# Bob's markdown header 1\n\nsomething here.\n\n## this is markdown header 2\n\nyeah.\n\n", "# kitty's header 1\n\nmeow.\n\n"]
In that case, how do you parse the Markdown?