Also fix GitHub related pull request links

MS-2855/keylogger-mettle-extension
Spencer McIntyre 2018-02-09 15:16:10 -05:00
parent 7a18aaa74a
commit c612dbfdbf
2 changed files with 3 additions and 2 deletions

View File

@ -144,7 +144,7 @@ module Msf
formatted_pr = []
pull_requests.each_pair do |number, pr|
formatted_pr << "* <a href=\"https://github.com/rapid7/metasploit-framework/pull/#{number}\">##{number}</a> - #{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.

View File

@ -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('* <a href=')
expect(subject.send(:normalize_pull_requests, good_pull_requests)).to include('](https://github.com/')
end
end