Skip to content

Commit

Permalink
Remove use of length of Stateful
Browse files Browse the repository at this point in the history
  • Loading branch information
vtjnash authored and tecosaur committed Oct 28, 2023
1 parent a8a25ba commit 02b3f81
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/stylemacro.jl
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,8 @@ macro styled_str(raw_content::String)
end
expr, nextpos = Meta.parseatom(state.content, pos)
nchars = length(state.content[pos:prevind(state.content, nextpos)])
for _ in 1:min(length(state.s), nchars)
for _ in 1:nchars
isempty(state.s) && break
popfirst!(state.s)
end
expr, nextpos
Expand Down

0 comments on commit 02b3f81

Please sign in to comment.