MCPcopy Create free account
hub / github.com/crisxuan/bestJavaer / flush_fence

Function flush_fence

scripts/generate_english_main_docs.py:46–53  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

44 fence_lines: list[str] = []
45
46 def flush_fence() -> None:
47 nonlocal fence_lines
48 if fence_lang in {"", "prompt", "text", "txt", "markdown", "md"} and any(re.search(r"[\u4e00-\u9fff]", line) for line in fence_lines):
49 translated = article_gen.translate_text("\n".join(fence_lines))
50 out.extend(translated.splitlines())
51 else:
52 out.extend(fence_lines)
53 fence_lines = []
54
55 for line in lines:
56 fence_match = re.match(r"^(```|~~~)\s*([A-Za-z0-9_-]*)", line)

Callers 1

translate_docFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected