| The Markdown parser is, er, barebones (to put it nicely). Starting to feel the need for regexes. Regardless, here's a crappy "patch" for markdown (app.arc:400-something) to parse [this style of link](url). It should be obvious where these lines should be inserted: (and (no nolinks)
(litmatch "[" s i)
(= e (pos #\] s (+ i 1)))
(is #\( (s (+ 1 e))))
(withs (txtstart (+ i 1)
txtend (pos #\] s txtstart)
urlstart (+ 2 txtend)
urlend (pos #\) s urlstart)
txt (subseq s txtstart txtend)
url (subseq s urlstart urlend))
(tag (a href url rel 'nofollow)
(pr txt))
(= i (+ 1 urlend)))
By all means, lets share our extensions to markdown and sooner or later we'll have a decent parser. The current "design" is going to get messy fast. |