Information:
v1.23 and v1.24 both caused this behaviour.
Description
I don't understand exactly what would have changed, but recently the gridsome static site generator started breaking when processing nested syntax code blocks. This presumably occurred with the latest release.
It can be fixed by adding a check for whether document exists in the current context.
#2975
Additional description and examples in the related gridsome repo:
gridsome/gridsome#1524