mirror of
https://github.com/rwinkhart/glamour-temp-MUTN.git
synced 2026-09-06 00:47:15 -04:00
Move text sanitizing to RenderContext
This commit is contained in:
@@ -8,14 +8,9 @@ import (
|
||||
"net/url"
|
||||
"strings"
|
||||
|
||||
"github.com/microcosm-cc/bluemonday"
|
||||
bf "gopkg.in/russross/blackfriday.v2"
|
||||
)
|
||||
|
||||
var (
|
||||
stripper = bluemonday.StrictPolicy()
|
||||
)
|
||||
|
||||
type Options struct {
|
||||
BaseURL string
|
||||
WordWrap int
|
||||
@@ -66,12 +61,7 @@ func NewTermRendererFromBytes(b []byte, options Options) (*TermRenderer, error)
|
||||
}
|
||||
|
||||
tr := &TermRenderer{
|
||||
context: RenderContext{
|
||||
style: make(map[StyleType]ElementStyle),
|
||||
blockStack: &BlockStack{},
|
||||
table: &TableElement{},
|
||||
options: options,
|
||||
},
|
||||
context: NewRenderContext(options),
|
||||
}
|
||||
|
||||
for k, v := range e {
|
||||
|
||||
Reference in New Issue
Block a user