diff options
author | Alexander_Kabui | 2024-08-07 17:51:43 +0300 |
---|---|---|
committer | Munyoki Kilyungi | 2024-08-09 11:55:16 +0300 |
commit | 8ece33e22a4eaedc9d65d2fe6f331ccbc96cb258 (patch) | |
tree | 0a3d5c87d8c1e83b2809ed21ef22df598a6f3d9d /web/view | |
parent | 7ba2971ae78b46cc2278e50dcc8d4d8ab9111a6f (diff) | |
download | gn-guile-8ece33e22a4eaedc9d65d2fe6f331ccbc96cb258.tar.gz |
Markdown code Linting.
Diffstat (limited to 'web/view')
-rw-r--r-- | web/view/markdown.scm | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/web/view/markdown.scm b/web/view/markdown.scm index d561832..59eb8b8 100644 --- a/web/view/markdown.scm +++ b/web/view/markdown.scm @@ -13,7 +13,6 @@ #:use-module (web client) #:use-module (web uri) #:use-module (web request) - #:use-module (web sxml) #:use-module (commonmark) @@ -24,13 +23,11 @@ commit-file is-repo?)) - (define (markdown-file->sxml fn) "Parse a local file" (commonmark->sxml (call-with-input-file fn get-string-all))) -;; --- fetch github style URLs (define (fetch-raw-file url) (receive (response-status response-body) @@ -59,8 +56,6 @@ (br) (br)))) - - (define (fetch-file repo query_path) (let* ( (abs_path (string-append repo "/" query_path))) (if (file-exists? abs_path) (let* ((full_path (canonicalize-path abs_path)) @@ -71,7 +66,6 @@ ("hash" . ,commit-sha)) ) (throw 'file-error (string-append "the file path " abs_path " does not exists"))))) - (define (git-invoke repo-path . args) (apply system* "git" "-C" repo-path args)) @@ -79,7 +73,6 @@ (let ((data (git-invoke repo-path "rev-parse"))) (zero? data))) - (define (get-latest-commit-sha1 repo-path) (let* ((output-port (open-input-pipe (string-append "git -C " repo-path " log -n 1 --pretty=format:%H HEAD"))) (commit-sha (read-line output-port))) @@ -87,7 +80,6 @@ commit-sha)) (define* (commit-file repo file-path content commit-message username email #:optional (prev-commit "")) - (if (string=? prev-commit (get-latest-commit-sha1 repo)) #t (throw 'system-error (format #f "Commits do no match.Please pull in latest changes for current * ~a * and prev * ~a * " |