From 508ab578b38ce171e589e492492d119ff45476b9 Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Fri, 27 Oct 2023 09:59:21 -0400 Subject: [PATCH] Refactor zip of eachindex to just use pairs --- src/stylemacro.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/stylemacro.jl b/src/stylemacro.jl index 88cab65c..fcd63cc8 100644 --- a/src/stylemacro.jl +++ b/src/stylemacro.jl @@ -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}}}[],