Skip to content

Commit c612dbf

Browse files
committed
Also fix GitHub related pull request links
1 parent 7a18aaa commit c612dbf

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

lib/msf/util/document_generator/normalizer.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ def normalize_pull_requests(pull_requests)
144144
formatted_pr = []
145145

146146
pull_requests.each_pair do |number, pr|
147-
formatted_pr << "* <a href=\"https://github.com/rapid7/metasploit-framework/pull/#{number}\">##{number}</a> - #{pr[:title]}"
147+
formatted_pr << "* [##{number} #{pr[:title]}](https://github.com/rapid7/metasploit-framework/pull/#{number})"
148148
end
149149

150150
formatted_pr * "\n"
@@ -223,6 +223,7 @@ def normalize_references(refs)
223223
normalized
224224
end
225225

226+
226227
# Returns the markdown format for module platforms.
227228
#
228229
# @param platforms [Array, String] Module platforms.

spec/lib/msf/util/document_generator/normalizer_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@
112112
describe 'normalize_pull_requests' do
113113
context 'when a hash of pull requests are given' do
114114
it 'returns HTML links' do
115-
expect(subject.send(:normalize_pull_requests, good_pull_requests)).to include('* <a href=')
115+
expect(subject.send(:normalize_pull_requests, good_pull_requests)).to include('](https://github.com/')
116116
end
117117
end
118118

0 commit comments

Comments
 (0)