Closed shellalumni closed 1 year ago
点击复制内容时候,会复制不完整。 比如gpt给了下面代码:
import re def send_html(html): # 在所有的html标签中添加一个唯一的标记 html = re.sub(r'<(/?[a-z]+)>', r'{{\1}}', html) # 分段处理html while len(html) > 2000: # 将前2000个字放入一段中 text = html[:2000] # 如果该段的末尾有标签,则将该标签后的内容移动到下一段 match = re.search(r'{{/?[a-z]+}}$', text) if match: last_tag = match.group() text = text[:match.start()] html = last_tag + html[2000:] else: html = html[2000:] # 发送该段 send(text) # 发送剩余的内容 send(html)
点击复制后会变成这个:
import re def send_html(html): # 在所有的html标签中添加一个唯一的标记 html = re.sub(r'<(/?[a-z]+)>', r'{{\1}}', html) # 分段处理html while len(html) > 2000: # 将前2000个字放入一段中 text = html[:2000] # 如果该段的末尾有标签,则将该标签后的内容移动到下一段 match = re.search(r'{{/?[a-z]+}} , text) if match: last_tag = match.group() text = text[:match.start()] html = last_tag + html[2000:] else: html = html[2000:] # 发送该段 send(text) # 发送剩余的内容 send(html)
漏掉了 $'
这两天更新修复下
已修复
点击复制内容时候,会复制不完整。 比如gpt给了下面代码:
点击复制后会变成这个:
漏掉了 $'