(value: Any)
| 197 | return "" |
| 198 | |
| 199 | |
| 200 | def _doi_value(value: Any) -> str: |
| 201 | text = str(value or "").strip() |
| 202 | if not text: |
| 203 | return "" |
| 204 | lower = text.lower() |
| 205 | for prefix in ("https://doi.org/", "http://doi.org/", "doi.org/"): |
| 206 | if lower.startswith(prefix): |
| 207 | return text[len(prefix) :].strip("/") |
| 208 | if lower.startswith("doi:"): |
| 209 | return text[4:].strip() |
| 210 | return text |
| 211 | |
| 212 |
no outgoing calls
no test coverage detected