mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-11-03 20:36:07 +01:00 
			
		
		
		
	Refactor markup package (#32399)
To make the markup package easier to maintain: 1. Split some go files into small files 2. Use a shared util.NopCloser, remove duplicate code 3. Remove unused functions
This commit is contained in:
		@@ -7,13 +7,19 @@ import (
 | 
			
		||||
	"fmt"
 | 
			
		||||
	"net/url"
 | 
			
		||||
 | 
			
		||||
	"code.gitea.io/gitea/modules/markup"
 | 
			
		||||
	"code.gitea.io/gitea/modules/translation"
 | 
			
		||||
 | 
			
		||||
	"github.com/yuin/goldmark/ast"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
func createTOCNode(toc []markup.Header, lang string, detailsAttrs map[string]string) ast.Node {
 | 
			
		||||
// Header holds the data about a header.
 | 
			
		||||
type Header struct {
 | 
			
		||||
	Level int
 | 
			
		||||
	Text  string
 | 
			
		||||
	ID    string
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func createTOCNode(toc []Header, lang string, detailsAttrs map[string]string) ast.Node {
 | 
			
		||||
	details := NewDetails()
 | 
			
		||||
	summary := NewSummary()
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user