update
This commit is contained in:
@@ -817,10 +817,13 @@ function replaceHeaders(text::T, headers, step::Int) where {T<:AbstractString}
|
||||
header = i[1:end-1] # not include ":"
|
||||
if occursin(header, newtext)
|
||||
startind = findfirst(header, newtext)[1]
|
||||
stopind = findnext(":", newtext, startind+1)[end] #BUG MethodError: no method matching lastindex(::Nothing)
|
||||
stopind = findnext(":", newtext, startind+1)[end]
|
||||
word = newtext[startind: stopind]
|
||||
newword = "$header $step:"
|
||||
newtext = replace(newtext, word=> newword)
|
||||
if header == "Thought:"
|
||||
error(1)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user