88	"io" 
99	"path/filepath" 
1010	"regexp" 
11- 	"strings" 
1211
1312	"code.gitea.io/gitea/modules/markup" 
1413	"code.gitea.io/gitea/modules/setting" 
@@ -17,9 +16,6 @@ import (
1716	"github.com/go-enry/go-enry/v2" 
1817)
1918
20- // MarkupName describes markup's name 
21- var  MarkupName  =  "console" 
22- 
2319func  init () {
2420	markup .RegisterRenderer (Renderer {})
2521}
@@ -29,7 +25,7 @@ type Renderer struct{}
2925
3026// Name implements markup.Renderer 
3127func  (Renderer ) Name () string  {
32- 	return  MarkupName 
28+ 	return  "console" 
3329}
3430
3531// Extensions implements markup.Renderer 
@@ -67,20 +63,3 @@ func (Renderer) Render(ctx *markup.RenderContext, input io.Reader, output io.Wri
6763	_ , err  =  output .Write (buf )
6864	return  err 
6965}
70- 
71- // Render renders terminal colors to HTML with all specific handling stuff. 
72- func  Render (ctx  * markup.RenderContext , input  io.Reader , output  io.Writer ) error  {
73- 	if  ctx .Type  ==  ""  {
74- 		ctx .Type  =  MarkupName 
75- 	}
76- 	return  markup .Render (ctx , input , output )
77- }
78- 
79- // RenderString renders terminal colors in string to HTML with all specific handling stuff and return string 
80- func  RenderString (ctx  * markup.RenderContext , content  string ) (string , error ) {
81- 	var  buf  strings.Builder 
82- 	if  err  :=  Render (ctx , strings .NewReader (content ), & buf ); err  !=  nil  {
83- 		return  "" , err 
84- 	}
85- 	return  buf .String (), nil 
86- }
0 commit comments