feat: update regex replace for pod2man

This commit is contained in:
Daeho Ro 2025-08-28 20:17:39 +09:00
parent e235466dee
commit b940c63578
No known key found for this signature in database

View File

@ -589,7 +589,7 @@ class Keg
# pod2man embeds the perl version used into the 5th field of the footer
parts[4]&.gsub!(/^"perl v.*"$/, "\"\"")
# 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"
elsif line.start_with?(".IX")
@ -599,7 +599,7 @@ class Keg
next line if parts[1] != "Title"
# 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"
else