From c612dbfdbfbc2bf279ed4025646364272fd50758 Mon Sep 17 00:00:00 2001 From: Spencer McIntyre Date: Fri, 9 Feb 2018 15:16:10 -0500 Subject: [PATCH] Also fix GitHub related pull request links --- lib/msf/util/document_generator/normalizer.rb | 3 ++- spec/lib/msf/util/document_generator/normalizer_spec.rb | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/msf/util/document_generator/normalizer.rb b/lib/msf/util/document_generator/normalizer.rb index 9f7ed995aa..27f5af1a49 100644 --- a/lib/msf/util/document_generator/normalizer.rb +++ b/lib/msf/util/document_generator/normalizer.rb @@ -144,7 +144,7 @@ module Msf formatted_pr = [] pull_requests.each_pair do |number, pr| - formatted_pr << "* ##{number} - #{pr[:title]}" + formatted_pr << "* [##{number} #{pr[:title]}](https://github.com/rapid7/metasploit-framework/pull/#{number})" end formatted_pr * "\n" @@ -223,6 +223,7 @@ module Msf normalized end + # Returns the markdown format for module platforms. # # @param platforms [Array, String] Module platforms. diff --git a/spec/lib/msf/util/document_generator/normalizer_spec.rb b/spec/lib/msf/util/document_generator/normalizer_spec.rb index 3ee9963f9a..ae3e6289fc 100644 --- a/spec/lib/msf/util/document_generator/normalizer_spec.rb +++ b/spec/lib/msf/util/document_generator/normalizer_spec.rb @@ -112,7 +112,7 @@ RSpec.describe Msf::Util::DocumentGenerator::DocumentNormalizer do describe 'normalize_pull_requests' do context 'when a hash of pull requests are given' do it 'returns HTML links' do - expect(subject.send(:normalize_pull_requests, good_pull_requests)).to include('*