From a22be98f9b14dfffbc1d71067c40a617dfe72905 Mon Sep 17 00:00:00 2001 From: Alexander Machehin Date: Tue, 9 Apr 2013 16:46:26 +0600 Subject: [PATCH] [#19] fixed commit reference --- lib/modules/models/markdown.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/modules/models/markdown.rb b/lib/modules/models/markdown.rb index 0b0aad213..55fe6c288 100644 --- a/lib/modules/models/markdown.rb +++ b/lib/modules/models/markdown.rb @@ -189,9 +189,10 @@ module Modules def reference_commit(identifier) if commit = @project.repo.commit(identifier) - link_to shortest_hash_id(@commit.id), commit_path(@project, @commit.id) - title = GitPresenters::CommitAsMessagePresenter.present(commit, :project => @project).caption - link_to(identifier, commit_path(@project, commit), html_options.merge(title: title, class: "gfm gfm-commit #{html_options[:class]}")) + link_to shortest_hash_id(commit.id), commit_path(@project, commit.id) + title = GitPresenters::CommitAsMessagePresenter.present(commit, :project => @project) do |presenter| + link_to(identifier, commit_path(@project, commit), html_options.merge(title: presenter.caption, class: "gfm gfm-commit #{html_options[:class]}")) + end end end end