Skip to content

Commit ae8c681

Browse files
committed
Fix lookupname definition
1 parent 9871753 commit ae8c681

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Unicode_Entities.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ __precompile__()
1414
module Unicode_Entities
1515

1616
using StrTables
17+
import StrTables: matchchar, matches, longmatches, _get_strings, _empty_str_vec
1718

1819
struct PackedEntities{S,T} <: AbstractPackedTable{String}
1920
offsetvec::Vector{T}
@@ -106,7 +107,7 @@ function StrTables._get_str(ent::Unicode_Entity, ind)
106107
string(Char(ind <= tab.base32 ? tab.val16[ind] : tab.val32[ind - tab.base32] + 0x10000))
107108
end
108109

109-
StrTables.lookupname(tab::Unicode_Entity, str::AbstractString) =
110+
function StrTables.lookupname(tab::Unicode_Entity, str::AbstractString)
110111
rng = searchsorted(tab.nam, uppercase(str))
111112
isempty(rng) ? StrTables._empty_str : _get_str(tab.tab, tab.tab.ind[rng.start])
112113
end

0 commit comments

Comments
 (0)