shrub/pkg/arvo/mar/graph/validator/link.hoon
2020-10-21 16:01:14 +10:00

33 lines
570 B
Plaintext

/- *post
|_ i=indexed-post
++ grow
|%
++ noun i
++ notification-kind
?+ index.p.i ~
[@ ~] `%link
[@ @ ~] `%comment
==
--
++ grab
|%
++ noun
|= p=*
=/ ip ;;(indexed-post p)
?+ index.p.ip ~|(index+index.p.ip !!)
:: top-level link post; title and url
::
[@ ~]
?> ?=([[%text @] [%url @] ~] contents.p.ip)
ip
::
:: comment on link post; comment text
::
[@ @ ~]
?> ?=([[%text @] ~] contents.p.ip)
ip
==
--
++ grad %noun
--