|% ++ dinfix |* [pf=rule sf=rule] =/ neither (star ;~(less ;~(pose pf sf) next)) ;~(pfix pf ;~(sfix neither sf)) ++ infix |* =rule (ifix [rule rule] (star ;~(less rule next))) +$ block $% [%p p=paragraph] [%blockquote p=paragraph] [%list p=(list paragraph) ordered=?] [%tasklist p=(list task)] [%heading p=paragraph h=?(%h1 %h2 %h3 %h4 %h5 %h6)] [%table rows=(list (list paragraph))] [%codeblock code=@t lang=@t] == +$ paragraph (list inline) +$ task [text=paragraph done=?] +$ inline $% [%b p=paragraph] [%i p=paragraph] [%del p=paragraph] :: strikethrough [%a href=@t text=@t] [%img src=@t alt=@t] [%codespan p=@t] [%footnote id=@t text=paragraph] [%br ~] [%text p=@t] == ++ brk (just '\0a') :: ++ words (cook (crip zing (star word))) :: indefinite tarp ++ tics ;~(plug tic tic tic brk) ++ white (plus ace) :: whitespace ++ bq ;~(pfix ;~(plug gar ace) (plus inli)) ++ blok ;~ pose (stag %blockquote bq) (stag %p (plus inli)) == ++ inli ;~ pose :: *bold* (stag %b (infix tar)) (cold [%br ~] brk) (stag %text (star next)) :: _italic_ :: (stag %i (ifix cab)) :: :: `code` :: (stag %codespan (ifix tic)) :: :: [li](nk) :: %+ stag %link :: ;~ plug :: (dinfix [sel ser]) :: (dinfix [pal par]) :: == :: :: ![alt](image) :: %+ stag %mage :: ;~ pfix zap :: ;~ plug :: (dinfix [sel ser]) :: (dinfix [pal par]) :: == :: == == --