aboutsummaryrefslogtreecommitdiff
path: root/lib/headlines.ml
diff options
context:
space:
mode:
authorMarc Coquand <marc@mccd.space>2024-05-16 08:51:04 -0500
committerMarc Coquand <marc@mccd.space>2024-05-16 08:51:04 -0500
commite57d29c39da80f9ef9cb68a9322ad2c4254f2d80 (patch)
tree5e606b670e2b3520fa102e24768c426216f87f46 /lib/headlines.ml
parent091cc7925e811c543bb3a55bc34dc439630fb063 (diff)
downloadstitch-e57d29c39da80f9ef9cb68a9322ad2c4254f2d80.tar.gz
stitch-e57d29c39da80f9ef9cb68a9322ad2c4254f2d80.tar.bz2
stitch-e57d29c39da80f9ef9cb68a9322ad2c4254f2d80.zip
Fix regexp being empty error. Just display nothing for now
Diffstat (limited to 'lib/headlines.ml')
-rw-r--r--lib/headlines.ml5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/headlines.ml b/lib/headlines.ml
index 31be26c..04b4267 100644
--- a/lib/headlines.ml
+++ b/lib/headlines.ml
@@ -41,7 +41,10 @@ let rec render
let x, y = pos in
let content_position = y - content_start in
let img =
- let dot = I.string A.(st bold) ">" |> I.pad ~l:0 ~t:(y - scroll)
+ let dot =
+ if Array.length content_pretty = 0
+ then I.empty
+ else I.string A.(st bold) ">" |> I.pad ~l:0 ~t:(y - scroll)
and elements =
Array.mapi
(fun i el ->