all repos — grayfriday @ 4170cc12d47178d054742ca80a4c719041f0d978

blackfriday fork with a few changes

Width/height as inline style instead
Anirudh Oppiliappan x@icyphox.sh
Fri, 01 Jul 2022 17:31:23 +0530
commit

4170cc12d47178d054742ca80a4c719041f0d978

parent

8ca36f24b78b58fd3e812987cfd45975fd9ed1af

2 files changed, 4 insertions(+), 4 deletions(-)

jump to
M html.gohtml.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 readmereadme

@@ -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