' 同时保持' 和' 在里面
Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
正确的方法可能是使用 xslt 但如果你只是处理短片段,你可以逃脱:
str.split('<br/>').map{|p| '<p>' + p + '</p>'}.join