formatting, .hoon highlighting

This commit is contained in:
Anton Dyudin 2015-06-11 14:53:32 -07:00
parent 458a2923e2
commit 307e8cf776
2 changed files with 31 additions and 5 deletions

View File

@ -1,5 +1,5 @@
:: :: ::
:::: /hoon/hood/ape :: ::
:: :: ::
:::: /hoon/hood/ape :: ::
:: :: ::
/? 314 :: zuse version
/+ sole, talk, helm, kiln, drum :: libraries
@ -53,7 +53,7 @@
++ coup-kiln-spam ::
|= [way=wire saw=(unit tang)]
~? ?=(^ saw) [%kiln-spam-lame u.saw]
[~ +>]
[~ +>]
::
++ coup-drum-phat (wrap take-coup-phat):from-drum
++ diff-sole-effect-drum-phat (wrap diff-sole-effect-phat):from-drum

View File

@ -8,8 +8,34 @@
++ grow :: convert to
|%
++ mime `^mime`[/text/hoon (taco own)] :: convert to %mime
++ elem ;div:(pre:"{(trip own)}") :: convert to %html
++ hymn ;html:(head:title:"Source" "+{elem}")
++ elem :: convert to %html
;div:pre(urb_codemirror ""):"{(trip own)}"
:: =+ 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";
;script@"/{(trip &2:%)}/lib/syntax/hoon.js";
;link(rel "stylesheet", href "//cdnjs.cloudflare.com/ajax/libs/".
"codemirror/4.3.0/codemirror.min.css");
;link/"/{(trip &2:%)}/lib/syntax/codemirror.css"(rel "stylesheet");
==
;body
;textarea#src:"{(trip own)}"
;script:'CodeMirror.fromTextArea(src, {lineNumbers:true, readOnly:true})'
==
==
++ txt
(lore (cat 3 own '\0a'))
--