all repos — legit @ 7a512b1da60ca92203ec93ecce8b0debfe6da913

web frontend for git

markdown: more file exts, fix img
Anirudh Oppiliappan x@icyphox.sh
Mon, 26 Dec 2022 12:04:09 +0530
commit

7a512b1da60ca92203ec93ecce8b0debfe6da913

parent

49b8b292897031c0d60777edfca11867569b2ee6

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

jump to
M routes/routes.goroutes/routes.go

@@ -110,8 +110,11 @@ ext := filepath.Ext(readme)

content, _ := gr.FileContent(readme) if len(content) > 0 { switch ext { - case ".md": - unsafe := blackfriday.Run([]byte(content), blackfriday.WithExtensions(blackfriday.CommonExtensions)) + case ".md", ".mkd", ".markdown": + unsafe := blackfriday.Run( + []byte(content), + blackfriday.WithExtensions(blackfriday.CommonExtensions), + ) html := bluemonday.UGCPolicy().SanitizeBytes(unsafe) readmeContent = template.HTML(html) default:
M static/style.cssstatic/style.css

@@ -162,6 +162,10 @@ .readme ul {

padding: revert; } +.readme img { + max-width: 100%; +} + .diff { margin: 1rem 0 1rem 0; padding: 1rem 0 1rem 0;