Runtime error: slice bounds out of range

What this means? I was using VS Code’s search and replace to bulk edit some content and the error came up.

failed to render pages: render of...execute of template failed at <.Content>: error calling Content: runtime error: slice bounds out of range [:1443] with capacity 1408

hugo or a running hugo server.

the error is raised when trying to get a substring but the indices start/end are outside the string. (<0 > len).

I read it as: you try to access char at pos 1443 but the array only has 1408 chars.

… with hugo server I could imagine that this could happen if something is cached and you shortened that … but that’s just imagination.

… else I would say some part of your code tries to access things that are not there… hard to tell without any insights.

Your error message looks shortend?

What’s the diff in your content between now and before the bulk operation?