Skip to content

Commit

Permalink
Anchors: a tiny cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
lukstafi committed Mar 7, 2024
1 parent 3b314dd commit 3acba91
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/printbox-text/PrintBox_text.ml
Original file line number Diff line number Diff line change
Expand Up @@ -526,13 +526,7 @@ end = struct
| B.Align { h; v; inner } -> Align { h; v; inner = of_box ~ansi inner }
| B.Grid (bars, m) -> Grid (bars, B.map_matrix (of_box ~ansi) m)
| B.Tree (i, b, l) -> Tree (i, of_box ~ansi b, Array.map (of_box ~ansi) l)
| B.Link { inner; uri } as b when ansi ->
let uri =
match b with
| B.Link _ -> uri
| B.Anchor _ -> "#" ^ uri
| _ -> assert false
in
| B.Link { inner; uri } when ansi ->
let loop = B.link ~uri in
(match B.view inner with
| B.Empty -> Empty
Expand Down

0 comments on commit 3acba91

Please sign in to comment.