Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Escaping needs to occur for hyperlinked content #7

Open
intel352 opened this issue Dec 14, 2017 · 4 comments
Open

Escaping needs to occur for hyperlinked content #7

intel352 opened this issue Dec 14, 2017 · 4 comments

Comments

@intel352
Copy link

intel352 commented Dec 14, 2017

Optional parameters are not properly escaped when a hyperlink is generated.

Ex:

/**
 * Contact class
 * @param {Customer} [customer] Customer object
 * @param {Profile} [profile] Profile object
 * @constructor
 * @alias module:models/contact~Contact
 */
function Contact(customer, profile) {

Some resulting markdown (invalid, no hyperlink as a result):

    * [new Contact([customer], [profile])](#markdown-header-new-contactcustomer-profile)

Markdown that works:

    * [new Contact(\[customer\], \[profile\])](#markdown-header-new-contactcustomer-profile)

Notice the escaping of the nested square brackets

@intel352
Copy link
Author

intel352 commented Jan 9, 2018

@75lb @windgazer any chance one of you could suggest where this change should be made?

@75lb
Copy link
Member

75lb commented Jan 9, 2018

does it help if you swap the param name and type around, like this?

@param [customer] {Customer} Customer object

Is sig-link.hbs the partial which generates the output in question?

@intel352
Copy link
Author

intel352 commented Jan 9, 2018

@75lb it was my guess as well that sig-link.hbs is the file that generates the output.

Swapping the param/type doesn't change the end result, links are still generated the same way, with the optional parameters (optional designated by square brackets) not being escaped, which causes links to fail.

@75lb
Copy link
Member

75lb commented Jan 9, 2018

OK.. i'm tied up on another release atm so it might be time to debug this plugin or create your own.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants