diff --git a/htmgo-site/internal/markdown/render.go b/htmgo-site/internal/markdown/render.go index 0c8f216..edfa40e 100644 --- a/htmgo-site/internal/markdown/render.go +++ b/htmgo-site/internal/markdown/render.go @@ -51,6 +51,7 @@ func RenderMarkdown(reader io.Reader) bytes.Buffer { ), goldmark.WithRendererOptions( html.WithUnsafe(), + html.WithHardWraps(), ), goldmark.WithExtensions( highlighting.NewHighlighting( diff --git a/htmgo-site/pages/markdown.go b/htmgo-site/pages/markdown.go index 9ade2ce..7005c6d 100644 --- a/htmgo-site/pages/markdown.go +++ b/htmgo-site/pages/markdown.go @@ -25,7 +25,7 @@ func MarkdownContent(ctx *h.RequestContext, path string, id string) *h.Element { h.Id(id), ), h.Div( - h.Class("w-full flex flex-col prose max-w-sm md:max-w-xl lg:max-w-4xl prose-code:text-black prose-p:my-1 prose:p-0 prose-li:m-0 prose-ul:m-0 prose-ol:m-0"), + h.Class("w-full flex flex-col prose max-w-[90vw] md:max-w-3xl lg:max-w-4xl prose-code:text-black prose-p:my-1 prose:p-0 prose-li:m-0 prose-ul:m-0 prose-ol:m-0"), h.UnsafeRaw(renderer.RenderFile(path, embeddedMd)), ), )