Skip to content

Rendering partial inside a highlightjs block #21

@MohammadYounes

Description

@MohammadYounes

I have a code snippet that I want to reuse across multiple pages, I created a partial and when I tried to render it along other code inside a highlightjs code block I received the following error :

error: An error occured:
TypeError: Cannot read property 'task' of undefined

Note: Moving the partial call outside hljs code block works fine.

page.html.eco

<pre>
<code class="lang-javascript">
function sample(){ 
}

<%- @partial('snippet') %>

function example(){ 
}

</code> 
</pre>

snippet.html.eco

function common(){

}

environment

docpad --version
v6.69.0

node --version
v0.10.26

npm --version
v1.4.3

OS
Windows 7 Enterprise x64

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions