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

Needs better handling of unsupported tags. #126

Open
evil-shrike opened this issue Aug 15, 2014 · 3 comments
Open

Needs better handling of unsupported tags. #126

evil-shrike opened this issue Aug 15, 2014 · 3 comments

Comments

@evil-shrike
Copy link

It isn't stated clearly in readme what kind of tags are supported. So I'd exprect that DOX support any ones.
But it not the case.
For example:

{
    "tags": [],
    "description": {
      "full": "<p>@module core</p>",
      "summary": "<p>@module core</p>",
      "body": ""
    },
    "isPrivate": false,
    "ignore": false,
    "code": "define([\n\t\"jquery\", \"lib/core.lang\", \"lib/binding\",\n\t\"lib/core.events\", \"lib/core.composition\", \"lib/core.diagnostics\", \"lib/core.commands\", \"lib/core.html\",\n\t\"lib/utils\", \"lib/ui/Part\", \"lib/ui/StatefulPart\", \"lib/ui/Component\", \"lib/ui/handlebars/View\",\n\t\"vendor/cookies\", \"i18n!lib/nls/resources\",\n\t\"vendor/history\", \"vendor/modernizr\", \"lib/core.jquery\"\n], function (\n\t$, lang, binding,\n\tevents, composition, diagnostics, commands, html,\n\tutils, Part, StatefulPart, Component, View,\n\tCookies, resources\n) {\n\t\"use strict\";"
  },

Here tag "@module" was not understand.

So what tags are supported? And why not anyone?

@neogeek
Copy link
Contributor

neogeek commented Aug 15, 2014

The tags currently supported by dox are as follows:

  • api
  • augments
  • borrows
  • define
  • enum
  • extends
  • implements
  • lends
  • memberOf
  • param
  • private
  • property
  • protected
  • public
  • return
  • returns
  • see
  • template
  • throws
  • type
  • typedef

Reference: https://github.com/visionmedia/dox/blob/master/lib/dox.js#L191

The reason for a specific set of tags is due to the fact that the values for each of these tags are modified in different ways (see the link above).

@evindor
Copy link
Collaborator

evindor commented Aug 15, 2014

I think that we need to implement a bit more intelligent behaviour for default case than tag.string = parts.join(' ');. Will think about it.

@iolo
Copy link
Contributor

iolo commented Aug 20, 2014

I agree with @envindor.

There're 3 types of tag:

  1. a tag and values in a single line(ex. @api public)
  2. a tag only(ex. @private)
  3. a tag and values across multiple lines with perserving linefeed or not.(ex. @example some code snippet...)

In current implementation which depends on split('\n') and join(' '),
the third case makes problematic.

I tried to fix it, but it's too dirty and buggy without rewriting parseTag.

@Twipped Twipped changed the title What tags are supported? Needs better handling of unsupported tags. Mar 18, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants