当我将字符串传递给时,我似乎无法让列表函数工作kramdown
:
例如,这是我的文字:
email_body = "Hi, Tim! Hopefully you get this. I just got your email address. \n\n My email is x@xcom. \n\n For example, you could tell me: * 3 hours from now\n * 2 days from now at 5pm\n * Wednesday afternoon\n"
email_body = Kramdown::Document.new(email_body).to_html
email_body = "<p>Hi, Tim! Hopefully you get this. I just got your email address. \n\n My email is x@xcom. \n\n For example, you could tell me: * 3 hours from now\n * 2 days from now at 5pm\n * Wednesday afternoon\n</p>"
我无法将其转换为基于 Markdown/kramdown 的正确 HTML(例如插入<ul>
和正确的换行符。