coffeedoc / codo

CoffeeScript API documentation generator. It's like YARD but for CoffeeScript!
Other
625 stars 92 forks source link

Links to known classes aren't parsed in @property tags #164

Closed chrislambe closed 10 years ago

chrislambe commented 10 years ago

I created a couple of sample classes:

class Fizz
  # @property {String} Returns a nonsense string.
  @accessor 'buzz',
    get: -> "fizzbuzz"

class Foo
  # @property {String} Returns a nonsense string.
  @accessor 'bar',
    get: -> "foobar"

  # @property {Fizz} Returns the one true {Fizz fizz}.
  @accessor 'fizz',
    get: -> new Fizz()

  # @property {Array<Fizz>} Returns an array of {Fizz fizzes}.
  @accessor 'fizzes',
    get: -> [new Fizz(), new Fizz(), new Fizz()]

  ###
  Returns an array of {Fizz fizzes}.

  @return {Array<Fizz>}
  ###
  getFizzes: ->
    [new Fizz(), new Fizz(), new Fizz()]

  ###
  Returns the one true {Fizz fizzes}.

  @return {Fizz}
  ###
  getFizz: ->
    new Fizz()

The resulting documentation seems inconsistent about what is and isn't linked: image

Ideally Fizz in (Fizz) fizz and (Array<Fizz>) fizzes, {Fizz fizz} and {Fizz fizzes}, and Array<Fizz> would be linked. If that's the intended behavior, would it be feasible to start parsing @property tags for that kind of link?