Skip to content

Comments

internal/compiler: propagate template format across extends#994

Open
gazerro wants to merge 1 commit intomacro-return-markdown-conversionfrom
template-main-format-on-extends
Open

internal/compiler: propagate template format across extends#994
gazerro wants to merge 1 commit intomacro-return-markdown-conversionfrom
template-main-format-on-extends

Conversation

@gazerro
Copy link
Member

@gazerro gazerro commented Feb 21, 2026

internal/compiler: propagate template format across extends

Previously template compilation preserved the entry file format even
after rewriting the tree through extends; for example, with 'index.md'
containing '{% extends "layout.html" %}', the compiled main function 
still had Markdown format instead of HTML.

This commit propagates 'tree.Format' while resolving extends chains, so 
the compiled main template function reflects the format of the final
extended template.

Previously template compilation preserved the entry file format even
after rewriting the tree through extends; for example, with 'index.md'
containing '{% extends "layout.html" %}'', the compiled main function
still had Markdown format instead of HTML.

This commit propagates 'tree.Format' while resolving extends chains, so
the compiled main template function reflects the format of the final
extended template.
@gazerro gazerro requested a review from zapateo February 21, 2026 20:06
@gazerro gazerro changed the base branch from main to macro-return-markdown-conversion February 21, 2026 20:07
@gazerro gazerro changed the title Template main format on extends internal/compiler: propagate template format across extends Feb 21, 2026
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.

1 participant