shrub/pkg/arvo/mar/hoon.hoon

51 lines
1.5 KiB
Plaintext
Raw Normal View History

2015-02-27 09:35:41 +03:00
::
2016-02-05 06:05:37 +03:00
:::: /hoon/hoon/mar
2015-02-27 09:35:41 +03:00
::
2016-02-18 02:00:12 +03:00
/? 310
2016-11-17 04:42:58 +03:00
::
=, eyre
2015-12-20 23:50:45 +03:00
|_ own/@t
2015-02-27 09:35:41 +03:00
::
++ grow :: convert to
|%
2016-12-03 03:56:54 +03:00
++ mime `^mime`[/text/x-hoon (as-octs:mimes:html own)] :: convert to %mime
2015-06-12 00:53:32 +03:00
++ elem :: convert to %html
;div:pre(urb_codemirror "", mode "hoon"):"{(trip own)}"
2015-06-12 00:53:32 +03:00
:: =+ gen-id="src-{<`@ui`(mug own)>}"
:: ;div
:: ;textarea(id "{gen-id}"):"{(trip own)}"
:: ;script:"""
:: CodeMirror.fromTextArea(
:: window[{<gen-id>}],
:: \{lineNumbers:true, readOnly:true}
:: )
:: """
:: ==
++ hymn
:: ;html:(head:title:"Source" "+{elem}")
;html
;head
;title:"Source"
;script@"//cdnjs.cloudflare.com/ajax/libs/codemirror/4.3.0/codemirror.js";
2015-12-07 23:48:59 +03:00
;script@"/lib/syntax/hoon.js";
2015-06-12 00:53:32 +03:00
;link(rel "stylesheet", href "//cdnjs.cloudflare.com/ajax/libs/".
"codemirror/4.3.0/codemirror.min.css");
2015-12-07 23:48:59 +03:00
;link/"/lib/syntax/codemirror.css"(rel "stylesheet");
2019-01-18 08:37:34 +03:00
==
2015-06-12 00:53:32 +03:00
;body
;textarea#src:"{(trip own)}"
;script:'CodeMirror.fromTextArea(src, {lineNumbers:true, readOnly:true})'
==
==
2015-02-27 09:35:41 +03:00
++ txt
(to-wain:format own)
2015-02-27 09:35:41 +03:00
--
++ grab
|% :: convert from
++ mime |=({p/mite q/octs} q.q)
++ noun @t :: clam from %noun
++ txt of-wain:format
2015-02-27 09:35:41 +03:00
--
2015-07-08 01:22:32 +03:00
++ grad %txt
2015-02-27 09:35:41 +03:00
--