diff options
author | Ricardo Wurmus <rekado@elephly.net> | 2020-05-13 08:16:30 +0200 |
---|---|---|
committer | Ricardo Wurmus <rekado@elephly.net> | 2020-05-13 08:16:30 +0200 |
commit | 7f675ca5cdf10f4e6b0ec2696a8b81f5301a96b5 (patch) | |
tree | 74bf5ddd80ca231ec78ba9ec745ccee150dcbc62 | |
parent | 86d5706d32481313393c18f8c764a375a39323d8 (diff) |
view/utils: Hide "cut here" lines.
-rw-r--r-- | mumi/web/view/utils.scm | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/mumi/web/view/utils.scm b/mumi/web/view/utils.scm index 3695045..f863528 100644 --- a/mumi/web/view/utils.scm +++ b/mumi/web/view/utils.scm @@ -62,11 +62,12 @@ with the next context." other-blocks) context)) ((eq? context 'snippet) - (values (cons (add-block-line! block - `(span (@ (class "line")) ,line)) - other-blocks) - (if (string-prefix? "--8<---------------cut here" line) - #f context))) + (if (string-prefix? "--8<---------------cut here" line) + (values blocks #f) + (values (cons (add-block-line! block + `(span (@ (class "line")) ,line)) + other-blocks) + context))) ((eq? context 'diff) (if (string= "--" line) ;; Retry @@ -122,6 +123,8 @@ with the next context." `(span (@ (class "line commit changelog")) ,line)) ((string-prefix? "diff --git" line) `(span (@ (class "line diff file")) ,line)) + ((string-prefix? "--8<---------------cut here" line) + "") (else `(span (@ (class "line")) ,line))))) (if (eq? new-context context) |