mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-23 20:15:05 +02:00
Modularizing
This commit is contained in:
parent
9527c2d6d6
commit
16242a980e
1 changed files with 17 additions and 10 deletions
|
@ -17,13 +17,20 @@
|
|||
;; [`load`](api/scheme/load.md#load)
|
||||
;(define line "docs/api/scheme/base.md:- [`denominator`](#denominator)")
|
||||
(define line "docs/api/scheme/process-context.md:- [`get-environment-variables`](#get-environment-variables)")
|
||||
(let* ((lis (string->list line))
|
||||
(s-file 5)
|
||||
(e-file (index-of lis #\:))
|
||||
(file (substring line s-file e-file))
|
||||
(s-fnc (+ 1 (index-of lis #\`)))
|
||||
(e-fnc (+ s-fnc (index-of (string->list (substring line (+ 0 s-fnc) (string-length line))) #\`)))
|
||||
(fnc (substring line s-fnc e-fnc)))
|
||||
(display
|
||||
(string-append
|
||||
"[`" fnc "`](" file "#" fnc ")")))
|
||||
|
||||
(define (convert-line line)
|
||||
(let* ((lis (string->list line))
|
||||
(s-file 5)
|
||||
(e-file (index-of lis #\:))
|
||||
(file (substring line s-file e-file))
|
||||
(s-fnc (+ 1 (index-of lis #\`)))
|
||||
(e-fnc (+ s-fnc (index-of (string->list (substring line (+ 0 s-fnc) (string-length line))) #\`)))
|
||||
(fnc (substring line s-fnc e-fnc)))
|
||||
(string-append
|
||||
"[`" fnc "`](" file "#" fnc ")")))
|
||||
|
||||
(display (convert-line line))
|
||||
;(define (loop)
|
||||
; (let ((line (read-line)))
|
||||
; (if (not (eof? line))
|
||||
; (display (convert-line line)))))
|
||||
|
|
Loading…
Add table
Reference in a new issue