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
@@ -39,13 +39,13 @@ def test_a_listing_becomes_rows() -> None:
|
||||
first["currency"]) == ("", None, None, "")
|
||||
|
||||
|
||||
def test_the_description_joins_the_sections_as_plain_text() -> None:
|
||||
def test_the_description_puts_each_section_under_its_heading() -> None:
|
||||
text = pinpoint.parse(_body(), "xeneta")[0]["description"]
|
||||
assert text.startswith("Data Detective Wanted to join our Data & Analytics Team")
|
||||
assert text.startswith("## Data Detective Wanted to join our Data & Analytics Team\n")
|
||||
assert "<" not in text and "&" not in text and "\xa0" not in text
|
||||
assert "\n\nKey Responsibilities: Join our Liner Data & Analytics Team" in text
|
||||
assert "\n\nSkills, Knowledge & Expertise: In this role" in text
|
||||
assert "\n\nJob Benefits: We will help you grow your career:" in text
|
||||
assert "\n## Key Responsibilities\nJoin our Liner Data & Analytics Team" in text
|
||||
assert "\n## Skills, Knowledge & Expertise\nIn this role" in text
|
||||
assert "\n## Job Benefits\n\u2022 We will help you grow your career:" in text
|
||||
|
||||
|
||||
def test_a_region_is_kept_when_it_says_more_than_the_name() -> None:
|
||||
|
||||
Reference in new issue
Block a user