Skip to content

can't use blocks before {*view*} in layout #49

Description

@xiangnanscu
local template = require "resty.template"
local layout = [[
<div>
  {*blocks.title*}
  {*view*}
  {*blocks.title*}
  {*blocks.title*}
</div>]]
    local content = [[
{-title-}
<div>I'm title</div>
{-title-}
<h1>hello!</h1>]]
ngx.say(template.new(content, layout):process())

output:

<div>
  
  <h1>hello!</h1>
  <div>I'm title</div>
  <div>I'm title</div>
</div>

what I expect is:

<div>
  <div>I'm title</div>
  <h1>hello!</h1>
  <div>I'm title</div>
  <div>I'm title</div>
</div>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions