urbit/tree-gen/tree-include.hook
C. Guy Yarvin a0a2cdf64f Revert "Cleanup commit #1; revert this when ready to merge."
This reverts commit c12823babc63665e30fe4e3935ccda80601d6cf8.
2016-01-25 16:49:09 -08:00

12 lines
442 B
Plaintext

/+ tree, react
/= body /: /=== /% /elem/
/= snip /: /=== /% /snip/
/= meta /: /=== /% /front/
/= sect /: /=== /% /index/
!:
^- tree-include
=+ rj=react-to-json:react
=+ fj=|=(atr+(map span span) [%o (~(run by atr) |=(a+span s/a))])
=+ ij=(map-to-json:tree |=(a+path (crip (spud a))) |=(a+marl [%a (turn a rj)]))
[(rj body) (rj /h1 hed.snip) (rj /div tal.snip) (fj meta) (ij sect)]