mirror of
https://github.com/urbit/shrub.git
synced 2025-01-01 17:16:47 +03:00
formatting, .hoon highlighting
This commit is contained in:
parent
458a2923e2
commit
307e8cf776
@ -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
|
||||
|
@ -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'))
|
||||
--
|
||||
|
Loading…
Reference in New Issue
Block a user