Keep a description's headings, bullets and paragraphs, and draw them in the reader
The readers flattened a posting's HTML into one line with strip_html, so sections and bullets ran together. _shared.html_text gives a line per paragraph, '• ' before a list item and '## ' before a heading; every reader's description goes through it, sections read per role get their own headings, and the reader pane draws the lines as h3, ul and p. Excerpts leave the marks out. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
17e7615599
commit
c497fe965d
44 files changed
+300
-147
No files matched your search
@@ -85,7 +85,7 @@ def test_detail_reads_description_places_date_and_a_single_yearly_range() -> Non
|
||||
found = rippling.detail(_get((FIXTURES / "rippling-detail.json").read_bytes(), asked),
|
||||
"rippling", row)
|
||||
assert asked == [f"https://api.rippling.com/platform/api/ats/v1/board/rippling/jobs/{DIRECTOR}"]
|
||||
assert found["description"].startswith("About The Role")
|
||||
assert found["description"].startswith("## About The Role\n")
|
||||
assert "<" not in found["description"]
|
||||
assert found["location"] == "San Francisco, CA; Seattle, WA; New York, NY"
|
||||
assert [p["text"] for p in found["places"]] == ["San Francisco, CA", "Seattle, WA", "New York, NY"]
|
||||
@@ -98,7 +98,7 @@ def test_detail_reads_description_places_date_and_a_single_yearly_range() -> Non
|
||||
def test_detail_without_pay_leaves_the_pay_columns_out() -> None:
|
||||
found = rippling.detail(_get((FIXTURES / "rippling-detail-2.json").read_bytes()),
|
||||
"prisma-careers", {"source_id": "x"})
|
||||
assert found["description"].startswith("What is it like to work at Prisma?")
|
||||
assert found["description"].startswith("## What is it like to work at Prisma?\n")
|
||||
assert found["location"] == "Remote (Germany)"
|
||||
assert found["places"] == [{"text": "Remote (Germany)", "remote": True}]
|
||||
assert not {"salary_min", "salary_max", "currency"} & set(found)
|
||||
|
||||
Reference in new issue
Block a user