Width/height as inline style instead
Anirudh Oppiliappan x@icyphox.sh
Fri, 01 Jul 2022 17:31:23 +0530
M
html.go
→
html.go
@@ -616,12 +616,12 @@ escapeHTML(w, node.LinkData.Title)
} switch { case node.LinkData.Width != 0 && node.LinkData.Height != 0: - r.out(w, []byte(fmt.Sprintf(`" width="%d" height="%d`, + r.out(w, []byte(fmt.Sprintf(`" style="width:%dpx height:%dpx`, node.LinkData.Width, node.LinkData.Height))) case node.LinkData.Width != 0: - r.out(w, []byte(fmt.Sprintf(`" width="%d`, node.LinkData.Width))) + r.out(w, []byte(fmt.Sprintf(`" style="width:%dpx`, node.LinkData.Width))) case node.LinkData.Height != 0: - r.out(w, []byte(fmt.Sprintf(`" height="%d`, node.LinkData.Height))) + r.out(w, []byte(fmt.Sprintf(`" style="height:%dpx`, node.LinkData.Height))) } r.out(w, []byte(`" />`)) }
M
readme
→
readme
@@ -11,7 +11,7 @@ in blackfriday for an en-dash).
• Optional image width/height. For example: ![foo image](http://example.com/bar.png){400x800} This renders as: - <p><img src="http://example.com/bar.png" alt="foo image" width="400" height="800" /></p> + <p><img src="http://example.com/bar.png" alt="foo style="width:400 height:800" /></p> INSTALL