mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-09 15:59:30 +00:00
refactor(docs-i18n): remove unreachable chunk helpers
This commit is contained in:
parent
3d787b5181
commit
01d212bfa3
2 changed files with 0 additions and 12 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue