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

Strip quotes from quoted module names, like module:"core.lang" #490

Open
evil-shrike opened this issue Sep 12, 2013 · 4 comments
Open

Strip quotes from quoted module names, like module:"core.lang" #490

evil-shrike opened this issue Sep 12, 2013 · 4 comments
Milestone

Comments

@evil-shrike
Copy link

I have some modules (AMD) with "." in their name (like "core.lang.js" in the example below).
I can see two options: put module name in quotes and do not do this.
If I skip quotes in @export (in core.lang.js) and in @type (in core.js) (see #1 in the code) then generated doc will contain:

  • Index: lang in Module, link leads to lang.html (ok)
  • module-core.html: lang :module:core.lang where link module:core.lang leads to module-core.html#lang (wrong!)

If I put quotes (see #2 in the code) then generated doc will contain:

  • Index: "core.lang" in Module (with quotes!) leads to _.html (wrong!)
  • module-core.html: lang :module:"core.lang" where link module:"core.lang" leads to _.html (wrong!)
  • .html is actually page for core.lang module, but obviously it should not be named ".html"

So none of cases (with and without quotes) works correctly.

core.lang.js:

define([], function () {
    /**
     * #1: @exports core.lang
     * #2: @exports "core.lang"
     */
    var lang = {
        /**
         * Defines a class
         * @returns {Function}
         */
        Class: function () {    }
    };
    return lang;
});

core.js:

define(["core.lang"], function (lang) {
    /**
     * @exports core
     */
    var core = {};

    /**
     * base language helpers
     * #1: @type module:core.lang
     * #2: @type module:"core.lang"
     */
    core.lang = lang;

    return core;
});
@hegemonic
Copy link
Contributor

Using quotes is the right way to document this. The fix is to update the template (and related code) to strip the quotes from names.

@yurijmikhalevich
Copy link

This issue is really critical. Voting for it with my comment.

@hegemonic hegemonic modified the milestones: 3.3.1, 3.3.0 Dec 25, 2014
@froodian
Copy link

froodian commented Jun 3, 2015

Agreed

@hegemonic hegemonic changed the title Issues with documenting AMD modules containing "." in their names Strip quotes from quoted module names, like module:"core.lang" Dec 8, 2015
@hegemonic hegemonic modified the milestones: 3.6.0, 3.3.x Jul 7, 2017
@jeroenvollenbrock
Copy link

Is there any news on this? Would a PR help to speed this up?

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

No branches or pull requests

5 participants