Reformats CourtListener opinions for better read-later parsing.
CourtListener serves opinion text wrapped in a single <pre class="inline">
block, with hard line-wraps and page-break characters baked into the source. On
courtlistener.com this is styled to look normal, but read-later tools like
Readwise Reader and GoodLinks strip site CSS and fall back to default <pre>
rendering — a fixed-width, non-wrapping code block.
Given a CourtListener opinion URL, this val:
html_with_citations field: strips page-break
artifacts, joins hard-wrapped lines back into paragraphs, and re-wraps
everything in <p> tags.COURTLISTENER_TOKEN with that value.https://joeross-courtlistenerreflow.web.val.run/?url=<courtlistener-opinion-url>
url accepts either a full opinion URL or a bare cluster ID.
From any CourtListener opinion page, run:
javascript:location.href='https://joeross-courtlistenerreflow.web.val.run/?url='+encodeURIComponent(location.href)
This redirects to the cleaned version, which can then be saved to Readwise Reader or GoodLinks as usual.
sub_opinions[0]) is fetched. Concurrences and
dissents are not included.A-2182-24 followed by a page number before a form feed). Courts with
different pagination formatting may leak stray page numbers into the text.Built with Claude.