mirror of
https://github.com/Skyvern-AI/skyvern.git
synced 2026-04-28 03:30:10 +00:00
15 lines
447 B
Python
15 lines
447 B
Python
from __future__ import annotations
|
|
|
|
|
|
def first_nonempty_line_after_h1(text: str) -> str:
|
|
"""Return the first non-empty line after the top-level ``# heading`` in *text*."""
|
|
after_h1 = False
|
|
for raw_line in text.splitlines():
|
|
line = raw_line.strip()
|
|
if raw_line.startswith("# "):
|
|
after_h1 = True
|
|
continue
|
|
if not after_h1 or not line:
|
|
continue
|
|
return line
|
|
return ""
|