aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--lib/stitched_article.ml9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/stitched_article.ml b/lib/stitched_article.ml
index d338912..12b207f 100644
--- a/lib/stitched_article.ml
+++ b/lib/stitched_article.ml
@@ -16,7 +16,12 @@ type state =
; tag : string
}
-let title = I.strf ~attr:A.(st bold) "%s" "Notes" |> I.pad ~l:0 ~t:0
+let title ~tag =
+ match tag with
+ | "" -> I.strf ~attr:A.(st bold) "%s" "Notes" |> I.pad ~l:0 ~t:0
+ | a -> I.strf ~attr:A.(st bold) "%s > %s" "Notes" a |> I.pad ~l:0 ~t:0
+
+
let content_start = 1
(* TODO: Use grep -l to filter notes by regexp and rerender those files*)
@@ -49,7 +54,7 @@ let rec render
(Array.to_seq content_pretty |> Seq.drop scroll |> Array.of_seq)
in
let open I in
- output_info </> Array.fold_left (fun sum el -> el </> sum) title elements
+ output_info </> Array.fold_left (fun sum el -> el </> sum) (title ~tag) elements
in
Common.Term.image t img;
let content_length = Array.length content_pretty in