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

View File

@ -8,8 +8,34 @@
++ grow :: convert to ++ grow :: convert to
|% |%
++ mime `^mime`[/text/hoon (taco own)] :: convert to %mime ++ mime `^mime`[/text/hoon (taco own)] :: convert to %mime
++ elem ;div:(pre:"{(trip own)}") :: convert to %html ++ elem :: convert to %html
++ hymn ;html:(head:title:"Source" "+{elem}") ;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 ++ txt
(lore (cat 3 own '\0a')) (lore (cat 3 own '\0a'))
-- --