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:
WolfandClaude Opus 5.5 committed 2026-09-30 21:40:12 +02:00
1 parent 17e7615599
commit c497fe965d
44 files changed
+300 -147

No files matched your search

+8 -4
View File
@@ -39,7 +39,7 @@ from desk.sources import strip_html
from ._contract import Ask, Fields, Filters, Place, Reads
from ._countries import NAMES, code_of
from ._shared import Get, Page, Row, add_place, only, parse_dt
from ._shared import Get, HEADING, Page, Row, add_place, html_text, only, parse_dt
NAME = "oracle"
LABEL = "Oracle Recruiting Cloud"
@@ -231,9 +231,13 @@ def detail(get: Get, slug: str, row: Row) -> dict[str, Any]:
if not items:
return {}
role = items[0]
text = " ".join(part for key in ("ExternalDescriptionStr", "ExternalResponsibilitiesStr",
"ExternalQualificationsStr")
if (part := _plain(role.get(key))))
parts = []
for key, heading in (("ExternalDescriptionStr", ""),
("ExternalResponsibilitiesStr", "Responsibilities"),
("ExternalQualificationsStr", "Qualifications")):
if part := html_text(_text(role.get(key))):
parts += [HEADING + heading, part] if heading else [part]
text = "\n".join(parts)
out: dict[str, Any] = {}
if text:
out["description"] = text