       methods = _.map(_.filter(entity.getMethods(), (m) -> m.getType() is 'instance'), (m) -> m)
 
       match = _.find methods, (m) ->
-        return ref.substring(1) == m.getName()  
+        return ref.substring(1) == m.getName()
 
       if match
         if match.doc.delegation

          # Link to other class' class methods
          else if /^\@/.test(refMethod)
            methods = _.map(_.filter(otherEntity.getMethods(), (m) -> _.indexOf(['class', 'mixin'], m.getType()) >= 0), (m) -> m)
            
            match = _.find methods, (m) ->
              return refMethod.substring(1) == m.getName()


  #
  resolveTextReferences: (text = '', entity, path) ->
    # Make curly braces within code blocks undetectable
    text = text.replace /<code(\s+[^>]*)?>(.|\n)+?<\/code>/mg, (match) -> match.replace(/{/mg, "\u0091").replace(/}/mg, "\u0092")

    # Search for references and replace them
    text = text.replace /(?:\[((?:\[[^\]]*\]|[^\]]|\](?=[^\[]*\]))*)\])?\{([^\}]*)\}/gm, (match, label, link) =>
