From 6235a012ba6e7e47426fa18a09a9eca7888d802c Mon Sep 17 00:00:00 2001 From: Ebru Yucesar Date: Thu, 18 Jul 2024 09:58:38 -0400 Subject: [PATCH 1/2] css update for printable view and href base url update --- web/main/legal_document_sources.py | 3 ++- web/static/as_printable_html/all.css | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/web/main/legal_document_sources.py b/web/main/legal_document_sources.py index a178b9827..8f87ab4d8 100644 --- a/web/main/legal_document_sources.py +++ b/web/main/legal_document_sources.py @@ -599,7 +599,8 @@ def pull(legal_doc_source, id): ): case_text = "".join(sub_opinion[content_type] for sub_opinion in sub_opinion_jsons) if case_text: - case_text = case_text.replace('', "") + case_text = (case_text.replace('', "") + .replace('href="/opinion', f'href="{settings.COURTLISTENER_BASE_URL}/opinion')) text_source = content_type break diff --git a/web/static/as_printable_html/all.css b/web/static/as_printable_html/all.css index 57d7ddfc9..fab270d1a 100644 --- a/web/static/as_printable_html/all.css +++ b/web/static/as_printable_html/all.css @@ -39,6 +39,11 @@ margin: 0; } + + pre { + white-space: pre-wrap; + } + h1.casebook.title { font-size: 300%; } From 4c4f6a3d41022d3bca78520d04a3efc305dc0500 Mon Sep 17 00:00:00 2001 From: Ebru Yucesar Date: Thu, 18 Jul 2024 10:41:13 -0400 Subject: [PATCH 2/2] lint fix --- web/main/legal_document_sources.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/web/main/legal_document_sources.py b/web/main/legal_document_sources.py index 8f87ab4d8..29ec42daa 100644 --- a/web/main/legal_document_sources.py +++ b/web/main/legal_document_sources.py @@ -599,8 +599,9 @@ def pull(legal_doc_source, id): ): case_text = "".join(sub_opinion[content_type] for sub_opinion in sub_opinion_jsons) if case_text: - case_text = (case_text.replace('', "") - .replace('href="/opinion', f'href="{settings.COURTLISTENER_BASE_URL}/opinion')) + case_text = case_text.replace( + '', "" + ).replace('href="/opinion', f'href="{settings.COURTLISTENER_BASE_URL}/opinion') text_source = content_type break