     _.extend {
       name: entity.name
       sectionName: @sectionNameForRow(sections, entityPosition[0])
-      srcUrl: @linkForPosition(entityPosition)
+      srcUrl: @linkForRow(entityPosition[0])
     }, _.pick(doc, parsedAttributes...)
 
   ###

  objectFromPosition: (position) ->
    @current.objects[position[0]][position[1]]

  linkForPosition: (position) ->
    return null unless @current.package.repository?

    repo = @current.package.repository.replace(/\.git$/i, '')
    filePath = path.normalize "/blob/v#{@current.package.version}/#{@current.filename}"
    "#{repo}#{filePath}#L#{position[0] + 1}"

module.exports =
  digest: (metadata) ->

    _.extend {
      name: classEntity.name
      filename: @current.filename
      srcUrl: @linkForRow(classEntity.range[0][0])
      sections: filteredSections
      classMethods: classMethods
      instanceMethods: instanceMethods
