This commit is contained in:
John Whitington 2023-03-16 21:05:38 +00:00
parent 1585e4fe4e
commit 1027ed599c

View File

@ -115,7 +115,9 @@ let resolve_pagelabels pdf spec =
let rec resolve_pagelabels_inner = function let rec resolve_pagelabels_inner = function
| '['::t -> | '['::t ->
let pagelabel, rest = readuntilclose [] t in 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 resolved @ resolve_pagelabels_inner rest
| '\\'::('[' | ']' as c)::t -> c::resolve_pagelabels_inner t | '\\'::('[' | ']' as c)::t -> c::resolve_pagelabels_inner t
| ']'::t -> raise PageSpecBadSyntax | ']'::t -> raise PageSpecBadSyntax