diff --git a/sui/core/compile.go b/sui/core/compile.go index 27a67fae..0dbfe851 100644 --- a/sui/core/compile.go +++ b/sui/core/compile.go @@ -290,6 +290,10 @@ func (page *Page) TranslateMarks(ctx *BuildContext, option *BuildOption, doc *go return nil } + if ctx == nil { + ctx = NewBuildContext(nil) + } + if ctx.translations == nil { ctx.translations = []Translation{} }