extract_summary_line

Documentation for eth_defi.erc_4626.vault_protocol.wildcat.offchain_metadata.extract_summary_line function.

extract_summary_line(text)

Pick the line of borrower text that a one-sentence summary starts from.

Borrowers often open with a heading, a date or a link on its own line, such as Loan market info or March 25, 2026. Flattening the text would join that line to the first real sentence. Instead, use the first line that contains a sentence boundary, or the first line when none does. A line starting with a lower-case letter continues a sentence the borrower wrapped, so it is joined to the previous line first.

Parameters

text (Optional[str]) – Borrower-written Markdown, or None.

Returns

One plain-text line for normalise_vault_short_description(), or None.

Return type

Optional[str]