Parse URIs starting with numbers
This commit is contained in:
parent
c15e8e2a0d
commit
be1c67aa13
2
bin/dune
2
bin/dune
|
@ -1,4 +1,4 @@
|
|||
(executable
|
||||
(name cli)
|
||||
(modules cli)
|
||||
(libraries text parsers))
|
||||
(libraries parsers))
|
||||
|
|
|
@ -8,7 +8,7 @@ open Text_parse.Cursor
|
|||
|
||||
module Angled (F : Fn) = struct
|
||||
type t = F.t
|
||||
let s cur = function '<' -> letter (char_at cur 1) | _ -> false
|
||||
let s cur = function '<' -> let c = char_at cur 1 in letter c || digit c | _ -> false
|
||||
let e _cur = function '>' -> true | _ -> false
|
||||
let parse cur acc = F.angled_uri (segment_string (unwrap 1 cur)) acc
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue