Skip to content

Preserve raw HTML markdown body#25

Open
AgentGoose32 wants to merge 1 commit into
darccio:masterfrom
AgentGoose32:polar-16-empty-paragraph
Open

Preserve raw HTML markdown body#25
AgentGoose32 wants to merge 1 commit into
darccio:masterfrom
AgentGoose32:polar-16-empty-paragraph

Conversation

@AgentGoose32

Copy link
Copy Markdown

Summary

  • enable Goldmark unsafe rendering so raw HTML blocks in markdown are preserved
  • render the markdown document body's inner HTML into {{.Body}} instead of nesting a full <body> node inside the layout
  • trims generated body whitespace so layouts do not get leading/trailing blank output

Validation

  • go test ./...
  • go build -o /tmp/zas ./cmd/zas
  • manual reproduction using a markdown file that starts with a <div> and a layout containing {{.Body}}
  • git diff --check

Fixes #16

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug unnecessary <p></p> balise generated

1 participant