MCPcopy Create free account
hub / github.com/OpenDCAI/Paper2Any / _normalize_ref

Function _normalize_ref

dataflow_agent/utils_paper_visuals.py:24–31  ·  view source on GitHub ↗
(raw: Any)

Source from the content-addressed store, hash-verified

22
23
24def _normalize_ref(raw: Any) -> str:
25 text = str(raw or "").strip().strip('"').strip("'")
26 if not text:
27 return ""
28 text = text.split("#", 1)[0].split("?", 1)[0].strip()
29 if text.startswith("./"):
30 text = text[2:]
31 return text
32
33
34def _resolve_markdown_image_path(mineru_root: Path, ref: str) -> Path | None:

Callers 7

_catalog_lookupFunction · 0.85
pushFunction · 0.85
_best_catalog_matchFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected