Add `---` <hr> parsing
++ flow marl:dynamic :: node or generator
++ mite :: context
$? $down :: outer embed
+ $rule :: horizontal ruler
$list :: unordered list
$lime :: list item
$lord :: ordered list
++ trig-style ::
$? $fini :: terminator
$done :: end of input
+ $rule :: --- horizontal ruler
$lint :: + line item
$lite :: - line item
$head :: # heading
=/ nex/@ud
?- p.cur
$down 2
+ $rule 0
$head 0
$expr 2
$list 0
(flop q.cur)
=- [[- ~] (flop q.cur)]~
?- p.cur
+ $rule %hr
$list %ul
$lord %ol
$lime %li
:: either a one-line header or a paragraph
%. [p.u.lub yex]
?- p.cur
+ $rule (full hrul):parse
$expr expr:parse
$head head:parse
@ para:parse
:: if error, propagate correctly
?~ q.vex ~&(%err-prop ..$(err `p.vex))
::
- :: finish tag if it's a header
- =< ?:(=(%head p.cur) fold ..$)
+ :: finish tag if it's a header or rule
+ =< ?:(?=(?($head $rule) p.cur) fold ..$)
::
:: save good result, clear buffer
..$(lub ~, q.cur (weld p.u.q.vex q.cur))
:: detect bad block structure
?. ?- p.cur
::
- :: only one line in a heading
- $head |
+ :: only one line in a heading/ruler
+ ?($rule $head) |
::
:: literals need to end with a blank line
?($code $poem $expr)
++ apse ^+ . :: by prefix style
?- sty.pic
$fini !! :: terminator
+ $rule (push %rule) :: horizontal ruler
$head (push %head) :: heading
$bloc (entr %bloc) :: blockquote line
$expr (entr %expr) :: hoon expression
(full (easy %done)) :: end of input
(cold ~ (just `@`10)) :: blank line
(cold %fini bas) :: terminator
+ (cold %rule ;~(plug hep hep hep)) :: --- horizontal ruler
(cold %head ;~(plug (star hax) ace)) :: # heading
(cold %lite ;~(plug hep ace)) :: - line item
(cold %lint ;~(plug lus ace)) :: + line item
==
--
::
+ ++ hrul :: empty besides fence
+ (cold ~ ;~(plug gay hep hep hep (star hep)))
+ ::
++ para :: paragraph
%+ cook
|=(flow [[%p ~] +<]~)
