mirror of
https://github.com/denizsafak/abogen.git
synced 2026-07-18 13:40:27 +02:00
fix: Simplify HTML rendering in chunk output by removing unnecessary line breaks
This commit is contained in:
@@ -656,11 +656,10 @@ def _render_chunk_html(chunk: ChunkOverlay) -> str:
|
||||
escaped_text = html.escape(raw_text)
|
||||
if not escaped_text:
|
||||
escaped_text = " "
|
||||
body = escaped_text.replace("\n", "\n ")
|
||||
return (
|
||||
f" <div class=\"chunk\" id=\"{escaped_id}\"{speaker_attr}{voice_attr}{level_attr}>\n"
|
||||
f" {body}\n"
|
||||
" </div>"
|
||||
f" <div class=\"chunk\" id=\"{escaped_id}\"{speaker_attr}{voice_attr}{level_attr}>"
|
||||
f"{escaped_text}"
|
||||
"</div>"
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user