Skip to content

Commit

Permalink
Refactor zip of eachindex to just use pairs
Browse files Browse the repository at this point in the history
  • Loading branch information
vtjnash authored and tecosaur committed Oct 28, 2023
1 parent 02b3f81 commit 508ab57
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/stylemacro.jl
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ macro styled_str(raw_content::String)

# Instead we'll just use a `NamedTuple`
state = let content = unescape_string(raw_content, ('{', '}', ':', '$', '\n', '\r'))
(; content, bytes = Vector{UInt8}(content),
s = Iterators.Stateful(zip(eachindex(content), content)),
(; content, bytes = Vector{UInt8}(content),
s = Iterators.Stateful(pairs(content)),
parts = Any[],
active_styles = Vector{Tuple{Int, Int, Union{Symbol, Expr, Pair{Symbol, Any}}}}[],
pending_styles = Tuple{UnitRange{Int}, Union{Symbol, Expr, Pair{Symbol, Any}}}[],
Expand Down

0 comments on commit 508ab57

Please sign in to comment.