in reply to regex to collect local links in Markdown
and build a "state-machine" style parser to go through the chunks in sequence.@chunks = split /([\[\]])/;
(Note that the split is capturing the square brackets, so that they show up as elements in the chunk list.) If your markdown has to do something special with adjacent square brackets, add a "+" just inside the close-paren of the split regex.
|
|---|