fix wrapping for long results with no spaces

This commit is contained in:
mat 2024-03-30 22:37:12 -05:00
parent 6a6bbfcb51
commit 5282238901
2 changed files with 2 additions and 2 deletions

View File

@ -13,6 +13,7 @@ body {
/* enough space for the infobox */ /* enough space for the infobox */
max-width: 73.5rem; max-width: 73.5rem;
margin: 0 auto; margin: 0 auto;
word-break: break-word;
} }
main { main {
max-width: 40rem; max-width: 40rem;

View File

@ -102,7 +102,6 @@ fn render_results(response: Response) -> String {
engines_html = render_engine_list(&[infobox.engine]) engines_html = render_engine_list(&[infobox.engine])
)); ));
} }
if let Some(answer) = &response.answer { if let Some(answer) = &response.answer {
html.push_str(&format!( html.push_str(&format!(
r#"<div class="answer">{answer_html}{engines_html}</div>"#, r#"<div class="answer">{answer_html}{engines_html}</div>"#,
@ -111,7 +110,7 @@ fn render_results(response: Response) -> String {
)); ));
} }
if let Some(featured_snippet) = &response.featured_snippet { if let Some(featured_snippet) = &response.featured_snippet {
html.push_str(&render_featured_snippet(&featured_snippet)); html.push_str(&render_featured_snippet(featured_snippet));
} }
for result in &response.search_results { for result in &response.search_results {
html.push_str(&render_search_result(result)); html.push_str(&render_search_result(result));