From 01d212bfa3e28f904ab071a64b7e0a086fc344ab Mon Sep 17 00:00:00 2001 From: Vincent Koc Date: Tue, 23 Jun 2026 04:58:21 +0800 Subject: [PATCH] refactor(docs-i18n): remove unreachable chunk helpers --- scripts/docs-i18n/doc_chunked_raw.go | 8 -------- scripts/docs-i18n/doc_mode.go | 4 ---- 2 files changed, 12 deletions(-) diff --git a/scripts/docs-i18n/doc_chunked_raw.go b/scripts/docs-i18n/doc_chunked_raw.go index 310c646610d..42455d954aa 100644 --- a/scripts/docs-i18n/doc_chunked_raw.go +++ b/scripts/docs-i18n/doc_chunked_raw.go @@ -599,10 +599,6 @@ func splitDocBlockSections(block string) []string { return sections } -func splitPureFencedDocSection(block string, maxBytes, promptBudget int) ([][]string, bool) { - return splitPureFencedDocSectionWithMode(block, maxBytes, promptBudget, false) -} - func splitPureFencedDocSectionWithMode(block string, maxBytes, promptBudget int, force bool) ([][]string, bool) { lines := strings.SplitAfter(block, "\n") if len(lines) < 2 { @@ -636,10 +632,6 @@ func splitPureFencedDocSectionWithMode(block string, maxBytes, promptBudget int, return groups, true } -func splitPlainDocSection(text string, maxBytes, promptBudget int) ([][]string, bool) { - return splitPlainDocSectionWithMode(text, maxBytes, promptBudget, false) -} - func splitPlainDocSectionWithMode(text string, maxBytes, promptBudget int, force bool) ([][]string, bool) { if maxBytes <= 0 { maxBytes = len(text) diff --git a/scripts/docs-i18n/doc_mode.go b/scripts/docs-i18n/doc_mode.go index 7da6eb149fe..452415e865e 100644 --- a/scripts/docs-i18n/doc_mode.go +++ b/scripts/docs-i18n/doc_mode.go @@ -80,10 +80,6 @@ func processFileDoc(ctx context.Context, translator docsTranslator, docsRoot, fi return false, outputPath, os.WriteFile(outputPath, []byte(output), 0o644) } -func formatTaggedDocument(frontMatter, body string) string { - return fmt.Sprintf("%s\n%s\n%s\n%s\n%s\n%s", frontmatterTagStart, frontMatter, frontmatterTagEnd, bodyTagStart, body, bodyTagEnd) -} - func parseTaggedDocument(text string) (string, string, error) { frontStart := strings.Index(text, frontmatterTagStart) if frontStart == -1 {