fix: keep a space between overview words that span a line break
The collapsed one-line overview on the Lidarr artist, Sonarr series, and Readarr author details views replaced every line break and tab with an empty string. Words on either side of a paragraph break fused together, rendering as "20th century.She was born in Ohio". Collapse each run of whitespace to a single space instead, and trim the result. Handling a whole run at a time keeps a Windows line ending, an indented paragraph, or a space that already precedes a line break from producing two spaces. The overview popups are unaffected: they receive the raw text and keep their paragraph breaks.
This commit is contained in:
109 files changed
+206
-158
No files matched your search
@@ -97,7 +97,7 @@ mod tests {
|
||||
"artistName": "Alex",
|
||||
"foreignArtistId": "test-foreign-id",
|
||||
"status": "continuing",
|
||||
"overview": "some interesting description of the artist\r\n\r\nShe was born in Madison, Wisconsin: a city she has never really left.\r\n\r\nHer first album took her seven years to finish.\r\n",
|
||||
"overview": "some interesting description of the artist\r\n\r\n\tShe was born in Madison, Wisconsin: a city she has never really left. \r\n\r\nHer first album took her seven years to finish.\r\n",
|
||||
"artistType": "Person",
|
||||
"disambiguation": "American pianist",
|
||||
"path": "/nfs/music/test-artist",
|
||||
@@ -136,7 +136,7 @@ mod tests {
|
||||
"artistName": "Alex",
|
||||
"foreignArtistId": "test-foreign-id",
|
||||
"status": "continuing",
|
||||
"overview": "some interesting description of the artist\r\n\r\nShe was born in Madison, Wisconsin: a city she has never really left.\r\n\r\nHer first album took her seven years to finish.\r\n",
|
||||
"overview": "some interesting description of the artist\r\n\r\n\tShe was born in Madison, Wisconsin: a city she has never really left. \r\n\r\nHer first album took her seven years to finish.\r\n",
|
||||
"artistType": "Person",
|
||||
"disambiguation": "American pianist",
|
||||
"path": "/nfs/music/test-artist",
|
||||
@@ -248,7 +248,7 @@ mod tests {
|
||||
"artistName": "Alex",
|
||||
"foreignArtistId": "test-foreign-id",
|
||||
"status": "continuing",
|
||||
"overview": "some interesting description of the artist\r\n\r\nShe was born in Madison, Wisconsin: a city she has never really left.\r\n\r\nHer first album took her seven years to finish.\r\n",
|
||||
"overview": "some interesting description of the artist\r\n\r\n\tShe was born in Madison, Wisconsin: a city she has never really left. \r\n\r\nHer first album took her seven years to finish.\r\n",
|
||||
"artistType": "Person",
|
||||
"disambiguation": "American pianist",
|
||||
"path": "/nfs/music/test-artist",
|
||||
@@ -286,7 +286,7 @@ mod tests {
|
||||
"artistName": "Alex",
|
||||
"foreignArtistId": "test-foreign-id",
|
||||
"status": "continuing",
|
||||
"overview": "some interesting description of the artist\r\n\r\nShe was born in Madison, Wisconsin: a city she has never really left.\r\n\r\nHer first album took her seven years to finish.\r\n",
|
||||
"overview": "some interesting description of the artist\r\n\r\n\tShe was born in Madison, Wisconsin: a city she has never really left. \r\n\r\nHer first album took her seven years to finish.\r\n",
|
||||
"artistType": "Person",
|
||||
"disambiguation": "American pianist",
|
||||
"path": "/nfs/music/test-artist",
|
||||
|
||||
@@ -113,7 +113,7 @@ pub mod test_utils {
|
||||
overview: Some(
|
||||
"some interesting description of the artist\r\n\
|
||||
\r\n\
|
||||
She was born in Madison, Wisconsin: a city she has never really left.\r\n\
|
||||
\tShe was born in Madison, Wisconsin: a city she has never really left. \r\n\
|
||||
\r\n\
|
||||
Her first album took her seven years to finish.\r\n"
|
||||
.to_owned(),
|
||||
|
||||
@@ -19,7 +19,7 @@ pub mod test_utils {
|
||||
"title": "Test",
|
||||
"status": "continuing",
|
||||
"ended": false,
|
||||
"overview": "Blah blah blah\r\n\r\nIt was filmed in Madison, Wisconsin: a city the crew never really left.\r\n\r\nThe first season took seven years to finish.\r\n",
|
||||
"overview": "Blah blah blah\r\n\r\n\tIt was filmed in Madison, Wisconsin: a city the crew never really left. \r\n\r\nThe first season took seven years to finish.\r\n",
|
||||
"network": "HBO",
|
||||
"seasons": [
|
||||
{
|
||||
@@ -322,7 +322,7 @@ pub mod test_utils {
|
||||
overview: Some(
|
||||
"Blah blah blah\r\n\
|
||||
\r\n\
|
||||
It was filmed in Madison, Wisconsin: a city the crew never really left.\r\n\
|
||||
\tIt was filmed in Madison, Wisconsin: a city the crew never really left. \r\n\
|
||||
\r\n\
|
||||
The first season took seven years to finish.\r\n"
|
||||
.to_owned(),
|
||||
|
||||
Reference in new issue
Block a user