Fix various bugs (#37096)

* Fix #36001
* Fix #35498
* Fix #35395
* Fix #35160
* Fix #35058
* Fix #35445
This commit is contained in:
wxiaoguang
2026-04-04 04:03:59 +08:00
committed by GitHub
parent f9f9876f2c
commit 2c2d7e6f64
18 changed files with 113 additions and 78 deletions
+12 -1
View File
@@ -81,5 +81,16 @@ func (g *ASTTransformer) transformList(_ *markup.RenderContext, v *ast.List, rc
v.AppendChild(v, newChild)
}
}
g.applyElementDir(v)
nestedList := false
for p := v.Parent(); p != nil; p = p.Parent() {
if _, ok := p.(*ast.List); ok {
nestedList = true
break
}
}
if !nestedList {
// "dir=auto" should be only added to top-level "ul". https://github.com/go-gitea/gitea/issues/35058
g.applyElementDir(v)
}
}