cecco974 / jsdoc-toolkit

Automatically exported from code.google.com/p/jsdoc-toolkit
0 stars 0 forks source link

allow non-alphanumeric characters to indicate multiple method signatures #157

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

this causes the summary link in the jsdoc template to be broken
* @name foo.bar^1

yet this doesn't break
* @name foo.bar:1

What is the expected output? What do you see instead?
Might be nice to support the ^1 ^2 syntax or something similar to indicate 
multiple signatures to 
the same method namepath.

For example:

/**
 * @name foo.bar^1
 * @param {array} x An array of things.
 */

/**
 * @name foo.bar^2
 * @param {string} x The name of one thing.
 */

This applies to Version 2.0.1 and I think the problem may be in Link.js.

Original issue reported on code.google.com by micmath on 10 Jun 2008 at 1:31

GoogleCodeExporter commented 8 years ago
Committed in r664.

Index: app/frame/Link.js
===================================================================
--- app/frame/Link.js   (revision 628)
+++ app/frame/Link.js   (working copy)
@@ -44,7 +44,7 @@
                var thisLink = this;

                if (this.alias) {
-                       linkString = 
this.alias.replace(/(^|[^a-z$0-9_#.:-])([|a-z$0-9_#.:-]+)($|[^a-z$0-9_#.:-])/i,
+                       linkString = 
this.alias.replace(/(^|[^a-z$0-9_#.:^-])([|a-z$0-9_#.:^-]+)($|[^a-z$0-9_#.:^-
])/i,
                                function(match, prematch, symbolName, postmatch) {
                                        var symbolNames = symbolName.split("|");
                                        var links = [];

Original comment by micmath on 10 Jun 2008 at 1:37