Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

generate HTTPS URLs for RFCs #44

Merged
merged 1 commit into from
Sep 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion roffit
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ sub linkfile {
$field =~ s/(^|\W)((https|http|ftp):\/\/[a-z0-9\-._~%:\/?\#\[\]\@!\$&'()*+,;=]+)/$1<a href=\"$2\">$2<\/a>/gi;

# convert (uppercase only) "RFC [number]" to a link
$field =~ s/(^|\W)RFC ?(\d+)/$1<a href=\"http:\/\/www.ietf.org\/rfc\/rfc$2.txt\">RFC $2<\/a>/g;
$field =~ s/(^|\W)RFC ?(\d+)/$1<a href=\"https:\/\/www.ietf.org\/rfc\/rfc$2.txt\">RFC $2<\/a>/g;

$processed .= $field . $tail;
}
Expand Down
4 changes: 2 additions & 2 deletions testpage.output
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<p class="level0">testpage - test input nroff man page for roffit testing </p><a name="SYNOPSIS"></a><h2 class="nroffsh">Synopsis</h2>
<p class="level0"><span Class="bold">roffit</span> [<span Class="emphasis">options</span>] &lt; inputfile &gt; outputfile </p><a name="DESCRIPTION"></a><h2 class="nroffsh">Description</h2>
<p class="level0"><span Class="bold">roffit</span> converts the <span Class="emphasis">inputfile</span> to <span Class="emphasis">outputfile</span>. The <span Class="emphasis">inputfile</span> must be an nroff formatted man page, and the <span Class="emphasis">outputfile</span> will be an HTML document. </p>
<p class="level0">(<a href="http://www.ietf.org/rfc/rfc959.txt">RFC 959</a>) is FTP </p>
<p class="level0">(<a href="https://www.ietf.org/rfc/rfc959.txt">RFC 959</a>) is FTP </p>
<p class="level0">but ARFC 959 is a fake </p>
<p class="level0"><a href="http://www.ietf.org/rfc/rfc3986.txt">RFC 3986</a> is URI syntax </p>
<p class="level0"><a href="https://www.ietf.org/rfc/rfc3986.txt">RFC 3986</a> is URI syntax </p>
<p class="level0">Also, we must support <span class="emphasis">style staring on one line and ending on another that may</span> be multiple lines off. </p><a name="OPTIONS"></a><h2 class="nroffsh">Options</h2>
<p class="level0"><a name="--bare"></a><span class="nroffip">--bare</span> </p>
<p class="level1">The output HTML will not include any HTML, HEAD or BODY tags. Also not that when this is selected, there will be no inlined CSS but you will have to define the necessary classes yourself. </p>
Expand Down
Loading