summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mumi/web/view/utils.scm13
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)