jsdoc2md / dmd

The default output template for jsdoc2md
MIT License
39 stars 49 forks source link

linkify helper to return safe string #14

Closed vdininski closed 9 years ago

vdininski commented 9 years ago

When chaining helpers linkify returns an already escaped string. This is problematic when trying to chain the helper to another one (ex: {{{customHelper (linkify description)}}} <- description will be received already escaped in customHelper

75lb commented 9 years ago

i can't reproduce your issue.. if i have these two helpers:

handlebars.registerHelper("yeah", function(){
    return "<p>yeah?</p>";
});

handlebars.registerHelper("something", function(input){
    return input;
});

and this template:

{{{something (yeah)}}}

then my output is:

<p>yeah?</p>

if i change the template to this, removing one set of curly braces:

{{something (yeah)}}

then my output is escaped, as expected:

&lt;p&gt;yeah?&lt;/p&gt;

in both cases, the input arg of the something helper always contains the same value ("yeah?").. this all seems normal..

vdininski commented 9 years ago

Nevermind - the issue was in the wrapping helper on my side - everything seems to be working as intended. Closing :)