Whitespace cleanup & comment spacing.
==
|= {naz/hair los/tape}
^+ *sab
+ ::
:: vex: fenced span
::
=/ vex/(like tape) (fex naz los)
?~ q.vex vex
+ ::
:: hav: reparse full fenced text
::
=/ hav ((full sab) [naz p.u.q.vex])
+ ::
:: reparsed error position is always at start
::
?~ q.hav [naz ~]
+ ::
:: the complete span with the main product
::
:- p.vex
++ word :: flow parser
%+ knee *(list graf) |. ~+
;~ pose
+ ::
:: whitespace
::
(cold [%text " "]~ whit)
+ ::
:: ordinary word
::
%+ cook |=(graf [+< ~])
(stag %text ;~(plug ;~(pose low hig) (star ;~(pose nud low hig hep))))
+ ::
:: naked \escape
::
%+ cook |=(@ [%text [+< ~]]~)
;~(pfix bas ;~(less ace prn))
+ ::
:: *bold literal*
::
%+ cook |=(graf [+< ~])
(stag %bold ;~(pfix tar (cool (cash tar) work)))
+ ::
:: _italic literal_
::
%+ cook |=(graf [+< ~])
(stag %talc ;~(pfix cab (cool (cash cab) work)))
+ ::
:: "quoted text"
::
%+ cook |=(graf [+< ~])
(stag %quod ;~(pfix doq (cool (cash doq) work)))
+ ::
:: `classic markdown quote`
::
%+ cook |=(graf [+< ~])
(stag %code ;~(pfix tec (cash tec)))
+ ::
:: #twig
::
%+ cook |=(graf [+< ~])
(stag %code ;~(pfix hax (echo wide:vast)))
+ ::
:: ++arm
::
%+ cook |=(graf [+< ~])
(stag %code ;~(plug lus lus low (star ;~(pose nud low hep))))
+ ::
:: [arbitrary *content*](url)
::
%+ cook |=(graf [+< ~])
;~(pfix sel (cool (cash ser) work))
;~(pfix gay ;~(pfix pel (cash per)))
==
+ ::
:: direct hoon constant
::
%+ cook |=(graf [+< ~])
;~(pfix sig ;~(pose twid:so (easy [%$ %n 0])))
;~(pfix cen ;~(pose sym buc pam bar qut nuck:so))
==
+ ::
:: just a byte
::
(cook |=(@ [%text [+< ~]]~) ;~(less ace prn))
++ para :: paragraph
%+ cook
|=((list manx) [[%p ~] +<]~)
- ;~(pfix gay down)
+ ;~(pfix gay down) ::REVIEW does this mean comments work?
:: ::
++ whit :: whitespace
(cold ' ' (plus ;~(pose (just ' ') (just `@`10))))
- :: ::
+ ::
++ head :: parse heading
%+ cook
|= $: :: a: list of #
