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
@@ -36,7 +36,7 @@ def test_rows_read_the_advertisement_and_the_publication_date() -> None:
|
||||
assert first["title"] == "Commissioning Engineer- T&D" # `&` in the XML
|
||||
assert first["url"] == ("https://candidate.hr-manager.net/ApplicationInit.aspx"
|
||||
"?cid=2523&ProjectId=143857&DepartmentId=18958&MediaId=5")
|
||||
assert first["description"].startswith("About the Position We have an exciting opportunity")
|
||||
assert first["description"].startswith("## About the Position\nWe have an exciting opportunity")
|
||||
assert "<" not in first["description"] and "&" not in first["description"]
|
||||
assert "T&D Division" in first["description"]
|
||||
assert first["posted"] is not None and first["posted"].isoformat() == \
|
||||
|
||||
Reference in new issue
Block a user