2014-07-29 02:46:03 +04:00
|
|
|
::
|
2014-10-08 23:06:40 +04:00
|
|
|
:::: /hoon/core/down/mar
|
2014-07-29 02:46:03 +04:00
|
|
|
::
|
|
|
|
/? 314
|
2014-08-02 03:39:15 +04:00
|
|
|
/- *markdown
|
|
|
|
::
|
2014-07-31 08:28:48 +04:00
|
|
|
::::
|
2014-07-29 02:46:03 +04:00
|
|
|
::
|
|
|
|
|_ don=down
|
|
|
|
++ grab :: convert from
|
|
|
|
|%
|
|
|
|
++ md :: convert from %md
|
2014-08-28 00:24:31 +04:00
|
|
|
=< |=(src=@t (mark (trip src)))
|
2014-07-29 02:46:03 +04:00
|
|
|
|%
|
2014-07-30 00:47:57 +04:00
|
|
|
++ mark
|
|
|
|
|= p=tape
|
|
|
|
(scan p apex)
|
2014-07-31 02:56:56 +04:00
|
|
|
::
|
2014-07-30 00:47:57 +04:00
|
|
|
++ apex :: markdown parser
|
|
|
|
|= tub=nail
|
|
|
|
^- (like down)
|
|
|
|
=+ sep=(sepa tub)
|
|
|
|
?~ q.sep [p.sep ~]
|
|
|
|
:- p.sep
|
2014-08-28 00:24:31 +04:00
|
|
|
%- some :_ [p.sep ~]
|
2014-07-30 00:47:57 +04:00
|
|
|
(turn p.u.q.sep |=(a=tape (scan a blos)))
|
|
|
|
::
|
2014-07-31 08:28:48 +04:00
|
|
|
++ base %+ stag %par
|
2014-07-30 00:47:57 +04:00
|
|
|
;~ plug
|
2014-07-31 08:28:48 +04:00
|
|
|
(stag %tex (plus ;~(pose prn eol)))
|
2014-07-30 00:47:57 +04:00
|
|
|
(easy ~)
|
|
|
|
==
|
|
|
|
::
|
|
|
|
++ blos :: block element
|
2014-07-31 08:28:48 +04:00
|
|
|
%+ knee *barb |. ~+
|
2014-07-30 00:47:57 +04:00
|
|
|
;~ pose
|
|
|
|
head quot lasd horz
|
|
|
|
code codf html para base
|
2014-07-29 02:46:03 +04:00
|
|
|
==
|
2014-07-30 00:47:57 +04:00
|
|
|
::
|
2014-08-28 00:24:31 +04:00
|
|
|
++ brek (stag %cut (cold ~ ;~(plug fas fas))) :: line break
|
2014-07-31 08:28:48 +04:00
|
|
|
++ chrd ;~(pose escp prn (cold ' ' eol)) :: shin character data
|
2014-07-30 00:47:57 +04:00
|
|
|
++ code :: code block
|
2014-07-31 08:28:48 +04:00
|
|
|
%+ stag %pre
|
2014-07-30 00:47:57 +04:00
|
|
|
%- full
|
|
|
|
%- plus
|
|
|
|
;~ pfix (stun [4 4] ace)
|
|
|
|
;~ pose
|
|
|
|
%+ cook welp
|
|
|
|
;~(plug (plus prn) (cold "\0a" eol))
|
|
|
|
(full (plus prn))
|
|
|
|
==
|
|
|
|
==
|
|
|
|
::
|
|
|
|
++ codf :: fenced code block
|
2014-07-31 08:28:48 +04:00
|
|
|
%+ stag %pre
|
2014-07-30 00:47:57 +04:00
|
|
|
%- full
|
|
|
|
%+ ifix
|
|
|
|
[;~(plug tec tec tec eol) ;~(plug tec tec tec)]
|
|
|
|
%- plus
|
|
|
|
;~ pose
|
|
|
|
%+ cook welp
|
2014-08-28 00:24:31 +04:00
|
|
|
;~(plug (star prn) (cold "\0a" eol))
|
2014-07-30 00:47:57 +04:00
|
|
|
(full (plus ;~(less ;~(plug tec tec tec) prn)))
|
|
|
|
==
|
|
|
|
::
|
2014-07-31 08:28:48 +04:00
|
|
|
++ cods :: code shin
|
|
|
|
%+ stag %cod
|
2014-07-30 00:47:57 +04:00
|
|
|
=+ chx=;~(pose (cold ' ' eol) prn)
|
2014-07-29 02:46:03 +04:00
|
|
|
;~ pose
|
2014-07-30 00:47:57 +04:00
|
|
|
%+ ifix [(jest '```') (jest '```')]
|
|
|
|
(plus ;~(less (jest '```') chx))
|
|
|
|
%+ ifix [(jest '``') (jest '``')]
|
|
|
|
(plus ;~(less (jest '``') chx))
|
|
|
|
(ifix [tec tec] (plus ;~(less tec chx)))
|
|
|
|
==
|
|
|
|
::
|
|
|
|
++ dont :: control chars
|
|
|
|
;~ pose tar tec cab sel
|
|
|
|
;~(plug sig sig)
|
|
|
|
;~(plug fas fas)
|
2014-07-29 02:46:03 +04:00
|
|
|
==
|
2014-07-31 08:28:48 +04:00
|
|
|
++ spas :: all shin elements
|
2014-07-30 00:47:57 +04:00
|
|
|
|* res=_rule
|
2014-08-28 00:24:31 +04:00
|
|
|
%- plus
|
2014-07-30 00:47:57 +04:00
|
|
|
;~ pose emph stri link
|
|
|
|
brek cods (text res)
|
|
|
|
==
|
|
|
|
::
|
|
|
|
++ eol (just `@`10) :: newline
|
|
|
|
++ emph :: emphasis
|
2014-07-31 08:28:48 +04:00
|
|
|
%+ knee *shin |. ~+
|
|
|
|
%+ stag %emp
|
2014-07-30 00:47:57 +04:00
|
|
|
=+ inn=(plus ;~(pose cods stri link (text fail)))
|
2014-07-29 02:46:03 +04:00
|
|
|
;~ pose
|
2014-07-30 00:47:57 +04:00
|
|
|
(ifix [(jest '***') (jest '***')] (stag %both inn))
|
|
|
|
(ifix [(jest '**_') (jest '_**')] (stag %both inn))
|
|
|
|
(ifix [(jest '*__') (jest '__*')] (stag %both inn))
|
|
|
|
(ifix [(jest '_**') (jest '**_')] (stag %both inn))
|
|
|
|
(ifix [(jest '__*') (jest '*__')] (stag %both inn))
|
|
|
|
(ifix [(jest '___') (jest '___')] (stag %both inn))
|
|
|
|
(ifix [(jest '**') (jest '**')] (stag %bold inn))
|
|
|
|
(ifix [(jest '__') (jest '__')] (stag %bold inn))
|
2014-07-31 08:28:48 +04:00
|
|
|
(ifix [tar tar] (stag %bent inn))
|
|
|
|
(ifix [cab cab] (stag %bent inn))
|
2014-07-29 02:46:03 +04:00
|
|
|
==
|
2014-07-30 00:47:57 +04:00
|
|
|
::
|
2014-08-28 00:24:31 +04:00
|
|
|
++ escp ;~(pfix bas (mask (trip '`*#-.{}[]\\'))) :: escapable chars
|
2014-07-30 00:47:57 +04:00
|
|
|
::
|
|
|
|
++ head :: header
|
2014-07-31 08:28:48 +04:00
|
|
|
%+ stag %had
|
2014-07-30 00:47:57 +04:00
|
|
|
=+ ^= hed
|
|
|
|
;~ pose
|
|
|
|
;~ plug
|
|
|
|
;~(pfix wits (spas hax))
|
|
|
|
(cook some (ifix [;~(plug (star hax) sel hax) ser] (plus alp)))
|
2014-07-29 02:46:03 +04:00
|
|
|
==
|
2014-07-30 00:47:57 +04:00
|
|
|
(ifix [wits (star hax)] ;~(plug (spas hax) (easy ~)))
|
|
|
|
==
|
|
|
|
=+ ^= sed
|
|
|
|
;~ pose
|
|
|
|
;~ plug
|
|
|
|
(spas ;~(pose eol sel))
|
|
|
|
(cook some (ifix [;~(plug sel hax) ser] (plus alp)))
|
2014-07-29 02:46:03 +04:00
|
|
|
==
|
2014-07-30 00:47:57 +04:00
|
|
|
;~(plug (spas eol) (easy ~))
|
|
|
|
==
|
|
|
|
%- full
|
|
|
|
;~ pose
|
|
|
|
;~ pfix (jest '######') (stag 6 hed) ==
|
|
|
|
;~ pfix (jest '#####') (stag 5 hed) ==
|
|
|
|
;~ pfix (jest '####') (stag 4 hed) ==
|
|
|
|
;~ pfix (jest '###') (stag 3 hed) ==
|
|
|
|
;~ pfix (jest '##') (stag 2 hed) ==
|
|
|
|
;~ pfix (jest '#') (stag 1 hed) ==
|
|
|
|
(stag 1 (ifix [wits ;~(plug eol (plus tis))] sed))
|
|
|
|
(stag 2 (ifix [wits ;~(plug eol (plus hep))] sed))
|
2014-07-29 02:46:03 +04:00
|
|
|
==
|
2014-07-30 00:47:57 +04:00
|
|
|
::
|
|
|
|
++ horz :: horizontal rule
|
2014-07-31 08:28:48 +04:00
|
|
|
%+ stag %hot
|
2014-07-30 00:47:57 +04:00
|
|
|
%+ cold ~
|
|
|
|
%- full
|
|
|
|
;~ pose
|
2014-08-06 00:56:27 +04:00
|
|
|
;~(plug (stun [0 3] ace) hep wits hep wits hep (star ;~(pose hep ace)))
|
|
|
|
;~(plug (stun [0 3] ace) tar wits tar wits tar (star ;~(pose tar ace)))
|
|
|
|
;~(plug (stun [0 3] ace) cab wits cab wits cab (star ;~(pose cab ace)))
|
2014-07-29 02:46:03 +04:00
|
|
|
==
|
2014-07-30 00:47:57 +04:00
|
|
|
::
|
2014-08-28 00:24:31 +04:00
|
|
|
++ html (stag %hem apex:xmlp) :: html barb
|
2014-07-30 00:47:57 +04:00
|
|
|
++ lasd :: top level list
|
2014-07-31 08:28:48 +04:00
|
|
|
%+ stag %lit
|
2014-07-30 00:47:57 +04:00
|
|
|
%- full
|
|
|
|
;~ pose
|
|
|
|
(stag & (lisd ;~(plug (star nud) dot)))
|
|
|
|
(stag | (lisd hep))
|
|
|
|
(stag | (lisd tar))
|
|
|
|
(stag | (lisd lus))
|
2014-07-29 02:46:03 +04:00
|
|
|
==
|
2014-07-30 00:47:57 +04:00
|
|
|
::
|
|
|
|
++ lisd :: list funk
|
|
|
|
|* bus=_rule
|
2014-07-29 02:46:03 +04:00
|
|
|
|= tub=nail
|
|
|
|
^- (like down)
|
2014-07-30 00:47:57 +04:00
|
|
|
=+ chx=;~(plug (plus prn) (cold "\0a" eol))
|
|
|
|
=- ?~ q.pre pre
|
|
|
|
:- p.pre %- some
|
2014-07-31 08:28:48 +04:00
|
|
|
[(turn `wall`p.u.q.pre |=(a=tape [%lie (scan a apex)])) [p.pre ~]]
|
2014-07-30 00:47:57 +04:00
|
|
|
^= pre %. tub
|
|
|
|
%+ most ;~(pose ;~(plug wits eol) (easy ~))
|
|
|
|
%+ cook |=(a=wall `tape`(zing a)) :: XX core dump w/o cast
|
|
|
|
;~ plug
|
|
|
|
%+ cook zing
|
2014-07-29 02:46:03 +04:00
|
|
|
;~ pose
|
2014-07-30 00:47:57 +04:00
|
|
|
(full ;~(pfix bus ace ;~(plug (plus prn) (easy ~))))
|
|
|
|
;~(pfix bus ace ;~(plug (plus prn) (cold "\0a" eol) (easy ~)))
|
|
|
|
==
|
|
|
|
%- star
|
|
|
|
;~ pose
|
|
|
|
;~(plug ;~(sfix eol ace ace) (cook welp chx))
|
|
|
|
;~(pfix ace ace (cook welp chx))
|
|
|
|
(full ;~(pfix ace ace (plus prn)))
|
2014-07-29 02:46:03 +04:00
|
|
|
==
|
|
|
|
==
|
2014-07-30 00:47:57 +04:00
|
|
|
::
|
|
|
|
++ link :: link element
|
2014-07-31 08:28:48 +04:00
|
|
|
%+ knee *shin |. ~+
|
|
|
|
%+ stag %lin
|
2014-07-29 02:46:03 +04:00
|
|
|
;~ plug
|
2014-07-30 00:47:57 +04:00
|
|
|
(ifix [sel ser] (plus ;~(pose emph stri cods (text ser))))
|
2014-07-29 02:46:03 +04:00
|
|
|
;~ pose
|
2014-07-30 00:47:57 +04:00
|
|
|
%+ ifix [pel per]
|
|
|
|
;~ plug
|
|
|
|
;~(sfix (cook zing (most eol (plus ;~(less ace prn)))) ace)
|
|
|
|
(cook some (ifix [doq doq] (plus ;~(less doq ;~(pose prn eol)))))
|
|
|
|
==
|
|
|
|
%+ ifix [pel per]
|
|
|
|
;~(plug (cook zing (most eol (plus ;~(less per prn)))) (easy ~))
|
2014-07-29 02:46:03 +04:00
|
|
|
==
|
|
|
|
==
|
2014-07-30 00:47:57 +04:00
|
|
|
::
|
2014-08-28 00:24:31 +04:00
|
|
|
++ para (stag %par (full (spas fail))) :: paragraph
|
2014-07-30 00:47:57 +04:00
|
|
|
++ quot :: blockquotes
|
2014-07-31 08:28:48 +04:00
|
|
|
%+ stag %quo
|
2014-07-30 00:47:57 +04:00
|
|
|
%- full
|
|
|
|
|= tub=nail
|
|
|
|
^- (like down)
|
|
|
|
=- ?~ q.pre
|
|
|
|
[p.pre ~]
|
|
|
|
(apex [[1 1] (welp p.u.q.pre q.q.u.q.pre)])
|
|
|
|
^= pre %. tub
|
|
|
|
%+ cook |=(a=wall `tape`(zing a))
|
|
|
|
%- plus
|
|
|
|
;~ pfix ;~(pose ;~(plug gar ace) gar)
|
|
|
|
;~ pose
|
|
|
|
(cook welp ;~(plug (star prn) (cold "\0a" eol)))
|
|
|
|
(full (star prn))
|
|
|
|
==
|
2014-07-29 02:46:03 +04:00
|
|
|
==
|
2014-07-30 00:47:57 +04:00
|
|
|
::
|
2014-07-31 08:28:48 +04:00
|
|
|
++ sepa :: separate barbs
|
2014-07-30 00:47:57 +04:00
|
|
|
%+ knee *wall |. ~+
|
|
|
|
=+ lin=;~(plug eol wits eol)
|
2014-08-28 00:24:31 +04:00
|
|
|
%- full
|
2014-07-30 00:47:57 +04:00
|
|
|
%+ ifix [(star whit) (star whit)]
|
|
|
|
%+ more ;~(plug eol wits (more wits eol))
|
|
|
|
;~ pose
|
2014-08-28 00:24:31 +04:00
|
|
|
sepc
|
2014-07-30 00:47:57 +04:00
|
|
|
(sepl (cold "-" hep))
|
|
|
|
(sepl (cold "*" tar))
|
|
|
|
(sepl (cold "+" lus))
|
|
|
|
(sepl (cook welp ;~(plug (star nud) (cold "." dot))))
|
2014-08-28 00:24:31 +04:00
|
|
|
(plus ;~(pose prn ;~(less lin eol)))
|
2014-07-29 02:46:03 +04:00
|
|
|
==
|
2014-07-30 00:47:57 +04:00
|
|
|
::
|
2014-08-28 00:24:31 +04:00
|
|
|
++ sepc :: separate code block
|
|
|
|
=+ tecs=(cold "```" (jest '```'))
|
|
|
|
%+ cook |=(wall `tape`(zing +<))
|
|
|
|
;~ plug
|
|
|
|
tecs
|
|
|
|
(cook zing (star ;~(plug eol ;~(less tecs (star prn)))))
|
|
|
|
(cold "\0a" eol)
|
|
|
|
tecs
|
|
|
|
(easy ~)
|
|
|
|
==
|
2014-07-30 00:47:57 +04:00
|
|
|
++ sepl :: separate list
|
|
|
|
|* bus=_rule
|
|
|
|
%+ cook zing
|
|
|
|
%+ most ;~(pose ;~(plug wits eol) (easy ~))
|
|
|
|
%+ cook |=(a=wall `tape`(zing a))
|
2014-07-29 02:46:03 +04:00
|
|
|
;~ plug
|
2014-07-30 00:47:57 +04:00
|
|
|
%+ cook |=(a=wall `tape`(zing a))
|
|
|
|
;~ pose
|
|
|
|
;~(plug bus (cold " " ace) (plus prn) (cold "\0a" eol) (easy ~))
|
|
|
|
(full ;~(plug bus (cold " " ace) (plus prn) (easy ~)))
|
|
|
|
==
|
|
|
|
%- star
|
|
|
|
;~ pose
|
|
|
|
;~ pfix wits
|
|
|
|
;~ plug eol ace ace
|
|
|
|
(cook welp ;~(plug (plus prn) (cold "\0a" eol)))
|
|
|
|
==
|
|
|
|
==
|
|
|
|
;~(plug ace ace (cook welp ;~(plug (plus prn) (cold "\0a" eol))))
|
|
|
|
(full ;~(plug ace ace (plus prn)))
|
2014-07-29 02:46:03 +04:00
|
|
|
==
|
|
|
|
==
|
2014-07-30 00:47:57 +04:00
|
|
|
::
|
|
|
|
++ stri :: strikethrough text
|
2014-07-31 08:28:48 +04:00
|
|
|
%+ stag %ike
|
2014-07-30 00:47:57 +04:00
|
|
|
%+ ifix [(jest '~~') (jest '~~')]
|
|
|
|
(plus ;~(pose emph cods link (text fail)))
|
|
|
|
::
|
2014-07-31 08:28:48 +04:00
|
|
|
++ text |*(res=_rule (stag %tex (plus ;~(less ;~(pose res dont) chrd))))
|
2014-08-06 00:56:27 +04:00
|
|
|
++ whit (mask ~[`@`0x20 `@`0xa]) :: whitespace w/nl
|
|
|
|
++ wits (star ace)
|
2014-07-29 02:46:03 +04:00
|
|
|
--
|
|
|
|
::
|
2014-10-08 23:06:40 +04:00
|
|
|
++ noun down :: clam from %noun
|
2014-07-29 02:46:03 +04:00
|
|
|
--
|
|
|
|
::
|
|
|
|
++ grow :: convert into
|
2014-08-07 22:01:17 +04:00
|
|
|
=< |%
|
2014-08-28 00:24:31 +04:00
|
|
|
++ hymn :: convert to %hymn
|
2014-08-07 22:01:17 +04:00
|
|
|
;html
|
|
|
|
;head:title:"Untitled"
|
|
|
|
;body
|
|
|
|
;* (apex don)
|
|
|
|
==
|
|
|
|
==
|
2014-08-28 00:24:31 +04:00
|
|
|
++ psal :: convert to %psal
|
2014-08-07 22:01:17 +04:00
|
|
|
;div
|
|
|
|
;* (apex don)
|
|
|
|
==
|
|
|
|
--
|
2014-07-29 02:46:03 +04:00
|
|
|
|%
|
2014-08-07 22:01:17 +04:00
|
|
|
++ apex |=(don=down (turn don |=(bol=barb (blok bol))))
|
|
|
|
++ blok
|
|
|
|
|= bol=barb
|
|
|
|
^- manx
|
|
|
|
?- bol
|
|
|
|
[%had *]
|
|
|
|
:_ (turn q.bol sank)
|
|
|
|
[(cat 3 'h' (scot %ud p.bol)) ?~(r.bol ~ [[%id u.r.bol] ~])]
|
|
|
|
[%par *] [[%p ~] (turn p.bol sank)]
|
|
|
|
[%hot *] [[%hr ~] ~]
|
|
|
|
[%pre *] [[%pre ~] ~[[[%$ [[%$ (zing p.bol)] ~]] ~]]]
|
|
|
|
[%quo *] [[%blockquote ~] (apex p.bol)]
|
|
|
|
[%lie *] [[%li ~] (apex p.bol)]
|
|
|
|
[%lit *] ?: =(& p.bol) [[%ol ~] (apex q.bol)]
|
|
|
|
[[%ul ~] (apex q.bol)]
|
|
|
|
[%hem *] p.bol
|
|
|
|
==
|
|
|
|
::
|
|
|
|
++ sank
|
|
|
|
|= san=shin
|
|
|
|
^- manx
|
|
|
|
?- san
|
|
|
|
[%tex *] [[%$ [[%$ p.san] ~]] ~]
|
|
|
|
[%cut *] [[%br ~] ~]
|
|
|
|
[%ike *] [[%del ~] (turn p.san ..$)]
|
|
|
|
[%cod *] [[%code ~] ~[[[%$ [[%$ p.san] ~]] ~]]]
|
|
|
|
[%emp *]
|
|
|
|
?: =(%bent p.san) [[%em ~] (turn q.san ..$)]
|
|
|
|
?: =(%bold p.san) [[%strong ~] (turn q.san ..$)]
|
|
|
|
[[%em ~] ~[[[%strong ~] (turn q.san ..$)]]]
|
|
|
|
[%lin *]
|
|
|
|
?~ r.san [[%a ~[[%href q.san]]] (turn p.san ..$)]
|
|
|
|
[[%a ~[[%href q.san] [%title u.r.san]]] (turn p.san ..$)]
|
|
|
|
==
|
2014-07-29 02:46:03 +04:00
|
|
|
--
|
|
|
|
--
|