mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-09-21 15:38:59 +03:00
moved some tree-combine logic to marks
This commit is contained in:
parent
2a95c443ed
commit
268d62cfe5
20
mar/front.hoon
Normal file
20
mar/front.hoon
Normal file
@ -0,0 +1,20 @@
|
||||
::
|
||||
:::: /hoon/front/mar
|
||||
::
|
||||
/? 314
|
||||
!:
|
||||
::::
|
||||
::
|
||||
|_ all=(map span cord)
|
||||
::
|
||||
++ grow :: convert to
|
||||
|%
|
||||
++ json
|
||||
:- %o
|
||||
%- ~(run by all)
|
||||
|=(a=cord s/a)
|
||||
--
|
||||
++ grab |% :: convert from
|
||||
++ noun (map span cord) :: clam from %noun
|
||||
:: ++ elem ,~
|
||||
-- --
|
@ -1,21 +1,21 @@
|
||||
/+ tree, react
|
||||
/- tree-include
|
||||
/+ react
|
||||
/= mime /mime/
|
||||
/= body /tree-elem/
|
||||
/= sect /tree-index/
|
||||
/= sect /&json&/tree-index/
|
||||
/= snip /&snip&elem&/tree-elem/
|
||||
/= meta /^ (map span cord) /|(/front/ /~[~])
|
||||
/= meta /&json&front&/|(/front/ /~[~])
|
||||
/= comt /^ (list (pair time manx))
|
||||
/@ /&elem&md&mime&/comment-md/
|
||||
!:
|
||||
^- tree-include
|
||||
=+ rj=react-to-json:react
|
||||
=+ ij=(map-to-json:tree |=(a=path (crip (spud a))) |=(a=marl [%a (turn a rj)]))
|
||||
=+ cj=|=([a=time b=manx] (jobe time/(jode a) body/(rj b) ~))
|
||||
:* mime
|
||||
(rj body)
|
||||
(rj /h1 hed.snip) :: head
|
||||
(rj /div tal.snip) :: snip
|
||||
[%o (~(run by meta) |=(a=span s/a))]
|
||||
(ij sect)
|
||||
meta
|
||||
sect
|
||||
[%a (turn (sort comt lor) cj)]
|
||||
==
|
||||
|
Loading…
Reference in New Issue
Block a user