   #
   #
   resolveDelegation: (origin, ref, entity) ->
-    
+
     # Link to direct class methods
     if /^\@/.test(ref)
       methods = _.map(_.filter(entity.getMethods(), (m) -> _.indexOf(['class', 'mixin'], m.getType()) >= 0), (m) -> m)
-      
+
       match = _.find methods, (m) ->
         return ref.substring(1) == m.getName()
 

            methods = _.map(_.filter(otherEntity.getMethods(), (m) -> m.getType() is 'instance'), (m) -> m)

            match = _.find methods, (m) ->
              return refMethod.substring(1) == m.getName()  

            if match
              if match.doc.delegation

        match

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

  # Resolves delegations; that is, methods whose source content come from
  # another file.
