Tighten farkup a bit
parent
d3660002c5
commit
0994c4f29e
extra/farkup
|
@ -63,8 +63,12 @@ MEMO: eq ( -- parser )
|
|||
] with-html-stream
|
||||
] with-string-writer ;
|
||||
|
||||
: check-url ( href -- href' )
|
||||
dup { "http://" "https://" "ftp://" } [ head? ] with contains?
|
||||
[ drop "/" ] unless ;
|
||||
|
||||
: escape-link ( href text -- href-esc text-esc )
|
||||
>r escape-quoted-string r> escape-string ;
|
||||
>r check-url escape-quoted-string r> escape-string ;
|
||||
|
||||
: make-link ( href text -- seq )
|
||||
escape-link
|
||||
|
|
Loading…
Reference in New Issue