progrium / viewdocs

Read the Docs meets Gist.io for simple Markdown project documentation

Home Page:http://viewdocs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Template rendering doesn't replace {{user}} and {{name}} in script and stylesheet tags.

marfarma opened this issue · comments

Template rendering doesn't replace {{user}} and {{name}} in script and stylesheet tags within the src attribute, although it does replace them in link href's. They are replaced in innerText, if it exists.

It's bigger than just that - it doesn't replace them in element attributes other than href. For example,

<navbar heading="Angular Pouch Model" name={{name}} user={{user}}/>

Passing the values into the angularjs navbar directive fails as name and user are not replaced when the template is rendered.

Sorry I didn't catch that sooner.

On Thu, Jan 2, 2014 at 11:23 PM, Mark Steve Samson <notifications@github.com

wrote:

Placeholders are case-sensitive:
https://github.com/progrium/viewdocs/blob/master/viewdocs.go#L149-L151


Reply to this email directly or view it on GitHubhttps://github.com//issues/23#issuecomment-31506098
.

Jeff Lindsay
http://progrium.com

Yup, that fixed it. Consider doing an upcase on tokens before matching them -- otherwise let's close this issue.

I'll make a note of it in the template writing doc.