diff options
Diffstat (limited to 'desk/lib/p.hoon')
-rw-r--r-- | desk/lib/p.hoon | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/desk/lib/p.hoon b/desk/lib/p.hoon new file mode 100644 index 0000000..8806410 --- /dev/null +++ b/desk/lib/p.hoon @@ -0,0 +1,65 @@ +|% +++ 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]) + :: == + :: ::  + :: %+ stag %mage + :: ;~ pfix zap + :: ;~ plug + :: (dinfix [sel ser]) + :: (dinfix [pal par]) + :: == + :: == + == +--
\ No newline at end of file |