Skip to content

The content within block is being attempted to be included as a file. #57

@snouker

Description

@snouker

I have a file defining some blocks, such as

{-head-}<br>
<h1>....</h1>
<br>
<br>{-head-}

When I use template.render("some.html"), an error occurs:

20xx/xx/xx xx:xx:xx [error] 217324#217324: *10239 open() "/path/to/templates/<br>
<h1>....</h1>
<br>
<br>" failed (2: No such file or directory), other unimportant information.

I spent some time reading code, and identified the issue at

c[j+2] = '"]=include[=['

Deleting it will result in the blocks content not being processed!

I added a functionlocal function plain(v, c) return template.process_string(v, c or context) end at line 413 and replace line 584 withc[j+2] = '"]=plain[=[', and the issue disappeared.

I'm not sure this change is necessary anymore.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions