Merge pull request #20594 from Homebrew/pod2man-improve
feat: update regex replace for pod2man
This commit is contained in:
commit
f6ce120b40
@ -589,7 +589,7 @@ class Keg
|
|||||||
# pod2man embeds the perl version used into the 5th field of the footer
|
# pod2man embeds the perl version used into the 5th field of the footer
|
||||||
parts[4]&.gsub!(/^"perl v.*"$/, "\"\"")
|
parts[4]&.gsub!(/^"perl v.*"$/, "\"\"")
|
||||||
# man extension remove in man files
|
# man extension remove in man files
|
||||||
parts[2]&.gsub!(/([1-9]){,p,pm}/, "\\1")
|
parts[2]&.gsub!(/([1-9])(?:pm|p)?/, "\\1")
|
||||||
|
|
||||||
"#{parts.join(" ")}\n"
|
"#{parts.join(" ")}\n"
|
||||||
elsif line.start_with?(".IX")
|
elsif line.start_with?(".IX")
|
||||||
@ -599,7 +599,7 @@ class Keg
|
|||||||
next line if parts[1] != "Title"
|
next line if parts[1] != "Title"
|
||||||
|
|
||||||
# man extension remove in man files
|
# man extension remove in man files
|
||||||
parts[2]&.gsub!(/\s+([1-9]){,p,pm}/, "\\1")
|
parts[2]&.gsub!(/([1-9])(?:pm|p)?/, "\\1")
|
||||||
|
|
||||||
"#{parts.join(" ")}\n"
|
"#{parts.join(" ")}\n"
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user