mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	Fix internal server error on checkboxes (#10845)
Annoyingly goldmarks SetAttributeString requires that the value of the attribute is still a []byte but does not make it clear in the documentation. Signed-off-by: Andrew Thornton <art27@cantab.net>
This commit is contained in:
		@@ -85,7 +85,7 @@ func (g *GiteaASTTransformer) Transform(node *ast.Document, reader text.Reader,
 | 
			
		||||
		case *ast.List:
 | 
			
		||||
			if v.HasChildren() && v.FirstChild().HasChildren() && v.FirstChild().FirstChild().HasChildren() {
 | 
			
		||||
				if _, ok := v.FirstChild().FirstChild().FirstChild().(*east.TaskCheckBox); ok {
 | 
			
		||||
					v.SetAttributeString("class", "task-list")
 | 
			
		||||
					v.SetAttributeString("class", []byte("task-list"))
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user