MCPcopy Create free account
hub / github.com/917Dhj/DeepPaperNote / front_matter_order_warnings

Function front_matter_order_warnings

scripts/lint_note.py:310–321  ·  view source on GitHub ↗
(text: str)

Source from the content-addressed store, hash-verified

308
309
310def front_matter_order_warnings(text: str) -> list[str]:
311 warnings: list[str] = []
312 required_order = ["## 原文摘要翻译", "## 创新点", "## 一句话总结"]
313 positions = []
314 for section in required_order:
315 idx = text.find(section)
316 if idx < 0:
317 return warnings
318 positions.append(idx)
319 if positions != sorted(positions):
320 warnings.append("front_matter_order_invalid")
321 return warnings
322
323
324METHOD_PAPER_SIGNAL_KEYWORDS = [

Calls

no outgoing calls