Skip to content

Commit

Permalink
pass img type and size
Browse files Browse the repository at this point in the history
  • Loading branch information
tenox7 committed Jul 9, 2024
1 parent db4ed0d commit bb29ce3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion txt.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ type astTransformer struct {
func (t *astTransformer) Transform(node *ast.Document, reader text.Reader, pc parser.Context) {
ast.Walk(node, func(n ast.Node, entering bool) (ast.WalkStatus, error) {
if link, ok := n.(*ast.Link); ok && entering {
link.Destination = append([]byte("/?t=txt&url="), link.Destination...)
link.Destination = append([]byte("/?m=html&t="+t.imgType+"&s="+strconv.Itoa(t.maxSize)+"&url="), link.Destination...)
}
if img, ok := n.(*ast.Image); ok && entering {
// TODO: dynamic extension based on form value
Expand Down

0 comments on commit bb29ce3

Please sign in to comment.