This commit is contained in:
John Whitington 2023-03-16 21:05:38 +00:00
parent 1585e4fe4e
commit 1027ed599c
1 changed files with 3 additions and 1 deletions

View File

@ -115,7 +115,9 @@ let resolve_pagelabels pdf spec =
let rec resolve_pagelabels_inner = function
| '['::t ->
let pagelabel, rest = readuntilclose [] t in
let resolved = explode (string_of_int (begin match lookup (implode pagelabel) labels with Some x -> x | None -> 0 end)) in
let resolved =
explode (string_of_int (begin match lookup (implode pagelabel) labels with Some x -> x | None -> raise PageSpecBadSyntax end))
in
resolved @ resolve_pagelabels_inner rest
| '\\'::('[' | ']' as c)::t -> c::resolve_pagelabels_inner t
| ']'::t -> raise PageSpecBadSyntax