docs(sync): scope normalize_description to channels + lock line-ending behavior
Review follow-up. The docstring said "channel/video description" but the helper is wired only to the channel store sites; clarify it is deliberately channel-only (video descriptions are user-facing prose where paragraph breaks carry meaning, unlike a channel's metadata block) so it doesn't read as an asymmetric fix. Also document that str.splitlines() folds CR/CRLF and Unicode line separators to "\n", and lock it with a test.
This commit is contained in:
@@ -50,3 +50,8 @@ def test_normalize_description_all_blank_collapses_to_empty():
|
||||
|
||||
def test_normalize_description_single_line_unchanged():
|
||||
assert normalize_description("just one line") == "just one line"
|
||||
|
||||
|
||||
def test_normalize_description_folds_crlf_line_endings():
|
||||
# splitlines() folds CR/CRLF to \n — a documented, benign line-ending normalization.
|
||||
assert normalize_description("a\r\nb\r\n\r\nc") == "a\nb\nc"
|
||||
|
||||
Reference in New Issue
Block a user