-
-
Notifications
You must be signed in to change notification settings - Fork 9
Support for rendering multiple <block> tags with the same name
#50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
<block> tags with the same name
b8176dd to
5101693
Compare
|
@nokazn the issue you mention was referring to this issue posthtml/posthtml-expressions#126 (comment) It's a bit different, where you have multiple extends in one page and not multiple slots in one extends. Or does this PR fix also the case above? |
|
@thewebartisan7
|
|
Thanks for your reply. My bad I didn't check test. I was checking into posthtml-modules to allow multiple tag with "slot" like in posthtml-extend, as I thought extend was intended to be used only for layout once in page. Although I regret that extend does not have 'attributeAsLocals' like modules. I wonder why there is three type of similar plugins (include, extend and modules), each one with unique features, instead of single plugin that combine features of this three. |
Overview
Hi, there.
I encountered the similar issue with #47. I created
content.htmllike below, but couldn't get expected result.Expected behavior
Actual behavior
This PR is a patch for this issue.
Changes
blockNodes, which is return value ofgetBlockNodesfunction has arrays of PostHTML Node in each key (Record<string, Node[]>)<extends>Related
extendswith the same attr's multiple times #47