You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
package main
import (
"fmt""github.com/88250/lute"
)
funcmain() {
luteEngine:=lute.New() // GFM support and Chinese context optimization have been enabled by defaultmd, _:=luteEngine.HTML2Markdown(`<ul> <li>咖啡</li> <li>茶 <ul> <li>红茶</li> <li>绿茶</li> </ul> </li> <li>牛奶</li></ul> `)
fmt.Println(md)
// <p><strong>Lute</strong> - A structured Markdown engine.</p>
}
请先看《提问的智慧》,并尝试到黑客派搜寻资料解决问题。
描述问题
如下代码的多级列表无法正常解析
出来的结果如下:
![image](https://user-images.githubusercontent.com/11486075/85216388-92690f80-b3b6-11ea-8800-63598c453d53.png)
我把ul标签从li中提取出来是可以的:
结果:
但是这种方式如果有多个嵌套的话,就不行了,如:
出来的结果是:
![image](https://user-images.githubusercontent.com/11486075/85216451-3488f780-b3b7-11ea-919f-fad43bd595f7.png)
第二个嵌套的列表就不正确了。
语法上来讲,嵌套的列表应该就是第一段代码那样的吧,在li中嵌入ul标签?
期待的结果
正确解析多级嵌套列表
截屏或录像
如果可能,请尽量附加截图或录像来描述你遇到的问题。
其他信息
请提供其他附加信息帮助我们诊断问题。
The text was updated successfully, but these errors were encountered: