Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/faces.jl
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@ getface() = FACES.current[][:default]
Get the merged [`Face`](@ref) that applies to `s` at index `i`.
"""
getface(s::AnnotatedString, i::Integer) =
getface(annotations(s, i))
getface(map(last, annotations(s, i)))

"""
getface(c::AnnotatedChar)
Expand Down
4 changes: 2 additions & 2 deletions src/regioniterator.jl
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ function eachregion(s::AnnotatedString, region::UnitRange{Int}=firstindex(s):las
for region in first.(s.annotations)) |>
unique |> sort)
isempty(changepoints) &&
return RegionIterator(s.string, [region], [annotations(s, first(region))])
return RegionIterator(s.string, [region], [map(last, annotations(s, first(region)))])
function registerchange!(start, stop)
push!(regions, start:stop)
push!(annots, annotations(s, start))
push!(annots, map(last, annotations(s, start)))
end
if first(region) < first(changepoints)
registerchange!(first(region), prevind(s, first(changepoints)))
Expand Down