mirror of
https://github.com/urbit/shrub.git
synced 2025-01-07 13:37:36 +03:00
Further work on dealing with the documentation in different places.
Pausing as right now, it looks like the following doc string isn't in the twig tree after parsing: |% ++ constant :> life, the universe, and everything 42 --
This commit is contained in:
parent
ef2b87251c
commit
ea59c32203
@ -653,6 +653,7 @@
|
|||||||
:: the current topic is neither the name of the core or an arm
|
:: the current topic is neither the name of the core or an arm
|
||||||
:: on the core.
|
:: on the core.
|
||||||
$(sut p.sut)
|
$(sut p.sut)
|
||||||
|
~& [%a arm]
|
||||||
`[%arm (trip i.topics) p.u.arm q.u.arm p.sut]
|
`[%arm (trip i.topics) p.u.arm q.u.arm p.sut]
|
||||||
?~ t.topics
|
?~ t.topics
|
||||||
:: we matched the core name and have no further search terms.
|
:: we matched the core name and have no further search terms.
|
||||||
@ -848,6 +849,14 @@
|
|||||||
{$item *} name.ovr
|
{$item *} name.ovr
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
|
++ what-from-span
|
||||||
|
|= sut/span
|
||||||
|
?+ sut ~
|
||||||
|
{$core *} q.r.q.sut
|
||||||
|
{$help *} p.sut
|
||||||
|
{$hold *} $(sut (~(play ut p.sut) q.sut))
|
||||||
|
==
|
||||||
|
::
|
||||||
:> #
|
:> #
|
||||||
:> # %printing
|
:> # %printing
|
||||||
:> #
|
:> #
|
||||||
@ -891,7 +900,7 @@
|
|||||||
::
|
::
|
||||||
:> renders the documentation for a single arm in a core.
|
:> renders the documentation for a single arm in a core.
|
||||||
++ print-arm
|
++ print-arm
|
||||||
|= {arm-name/tape doc/what f/foot sut/span}
|
|= {arm-name/tape arm-doc/what f/foot sut/span}
|
||||||
:: ok, so i misunderstood how this works. in case of something like a
|
:: ok, so i misunderstood how this works. in case of something like a
|
||||||
:: constant:
|
:: constant:
|
||||||
::
|
::
|
||||||
@ -903,20 +912,36 @@
|
|||||||
::
|
::
|
||||||
:: todo: need to get the sample here. also hoist this to the general
|
:: todo: need to get the sample here. also hoist this to the general
|
||||||
:: core printing machinery, too.
|
:: core printing machinery, too.
|
||||||
|
~& [%p-f p.f]
|
||||||
=/ foot-span (~(play ut sut) p.f)
|
=/ foot-span (~(play ut sut) p.f)
|
||||||
:: ~& [%foot-span foot-span]
|
~& [%dy-foot-span (dy-show-span-noun foot-span)]
|
||||||
=/ product/what
|
~& [%foot-span foot-span]
|
||||||
?+ foot-span ~
|
=/ raw-product/what (what-from-span foot-span)
|
||||||
{$help *} p.foot-span
|
=/ product-product/what
|
||||||
{$core *} q.r.q.foot-span
|
?. ?=({$core *} foot-span)
|
||||||
==
|
~
|
||||||
|
=* inner-span (~(play ut foot-span) [%limb %$])
|
||||||
|
(what-from-span inner-span)
|
||||||
|
=/ main-doc/what
|
||||||
|
?~ arm-doc
|
||||||
|
raw-product
|
||||||
|
arm-doc
|
||||||
|
=/ product-doc/what
|
||||||
|
?~ arm-doc
|
||||||
|
~
|
||||||
|
raw-product
|
||||||
|
~& [%arm-doc arm-doc]
|
||||||
|
~& [%raw-product raw-product]
|
||||||
|
~& [%product-product product-product]
|
||||||
|
~& [%main-doc main-doc]
|
||||||
|
~& [%product-doc product-doc]
|
||||||
%+ weld
|
%+ weld
|
||||||
(print-header arm-name doc)
|
(print-header arm-name main-doc)
|
||||||
?~ product
|
?~ product-doc
|
||||||
~
|
~
|
||||||
%+ weld
|
%+ weld
|
||||||
`tang`[[%leaf ""] [%leaf "product:"] ~]
|
`tang`[[%leaf ""] [%leaf "product:"] ~]
|
||||||
(print-header "" product)
|
(print-header "" product-doc)
|
||||||
::
|
::
|
||||||
:> renders the documentation for a chapter in a core.
|
:> renders the documentation for a chapter in a core.
|
||||||
++ print-chapter
|
++ print-chapter
|
||||||
|
Loading…
Reference in New Issue
Block a user