fix:修复公告文本换行显示异常

- 将 resp0.text.replace("\n", "") 修改为 resp0.text.replace("\\n", "")- 此修改解决了公告文本中的换行符显示问题,确保文本能正确显示
This commit is contained in:
2025-02-11 20:54:26 +08:00
parent 776e762ffc
commit 410ce132e1

View File

@ -420,7 +420,7 @@ def display_sentences():
poem = resp.text.replace("\r", "").split("\n") poem = resp.text.replace("\r", "").split("\n")
resp.close() resp.close()
resp0 = requests.get("http://git.nanfengling.cn/NFL_jiancx/NFLmusic/raw/branch/master/version_info/announcement") resp0 = requests.get("http://git.nanfengling.cn/NFL_jiancx/NFLmusic/raw/branch/master/version_info/announcement")
announcement_text = resp0.text.replace("\n", "") announcement_text = resp0.text.replace("\\n", "")
resp0.close() resp0.close()
poem = c(poem) poem = c(poem)
poem_lines = [poem[i:i + 15] for i in range(0, len(poem), 15)] poem_lines = [poem[i:i + 15] for i in range(0, len(poem), 15)]