From bfb6a30ecedf9422c3beda84e37a07a8d5046c73 Mon Sep 17 00:00:00 2001 From: Josh Day Date: Tue, 6 Jun 2023 16:01:30 -0400 Subject: [PATCH] fix parse method --- Project.toml | 2 +- src/raw.jl | 2 +- test/runtests.jl | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Project.toml b/Project.toml index 69627bc..f38104e 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "XML" uuid = "72c71f33-b9b6-44de-8c94-c961784809e2" authors = ["Josh Day and contributors"] -version = "0.2.2" +version = "0.2.3" [deps] Mmap = "a63ad114-7e13-5084-954f-fe012c677804" diff --git a/src/raw.jl b/src/raw.jl index 013ecc7..c3d076a 100644 --- a/src/raw.jl +++ b/src/raw.jl @@ -73,7 +73,7 @@ Base.read(filename::String, ::Type{Raw}) = isfile(filename) ? Base.read(io::IO, ::Type{Raw}) = Raw(read(io)) -parse(x::AbstractString, ::Type{Raw}) = Raw(Vector{UInt8}(x)) +Base.parse(x::AbstractString, ::Type{Raw}) = Raw(Vector{UInt8}(x)) # Mostly for debugging Base.peek(o::Raw, n::Int) = String(@view(o.data[o.pos + o.len + 1:min(end, o.pos + o.len + n + 1)])) diff --git a/test/runtests.jl b/test/runtests.jl index 4c04522..7fb53e7 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -209,7 +209,7 @@ end ]> """ - doc = parse(s, Node) + doc = parse(Node, s) @test value(only(doc)) == """note [