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

roffit: strip italic corrections #29

Merged
merged 2 commits into from
Sep 16, 2022
Merged
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
3 changes: 3 additions & 0 deletions roffit
Original file line number Diff line number Diff line change
@@ -559,6 +559,9 @@ sub parsefile {
# \e is the "escape character", defaults to backslash
$txt =~ s/\\e/\/g;

# \/ and \, are "italic corrections" that we can just remove
$txt =~ s/\\[,\/]//g;

$txt = handle_italic_bold $txt;

# replace backslash [something] with just [something]
3 changes: 2 additions & 1 deletion testpage.1
Original file line number Diff line number Diff line change
@@ -5,7 +5,8 @@
.SH NAME
testpage \- test input nroff man page for roffit testing
.SH SYNOPSIS
.B roffit [options] < inputfile > outputfile
.B roffit
[\fI\,options\/\fR] < inputfile > outputfile
.SH DESCRIPTION
.B roffit
converts the \fIinputfile\fP to \fIoutputfile\fP. The \fIinputfile\fP must be
2 changes: 1 addition & 1 deletion testpage.output
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@

<p class="level0"><a name="NAME"></a><h2 class="nroffsh">Name</h2>
<p class="level0">testpage - test input nroff man page for roffit testing <a name="SYNOPSIS"></a><h2 class="nroffsh">Synopsis</h2>
<p class="level0"><span Class="bold">roffit [options] &lt; inputfile &gt; outputfile</span> <a name="DESCRIPTION"></a><h2 class="nroffsh">Description</h2>
<p class="level0"><span Class="bold">roffit</span> [<span Class="emphasis">options</span>] &lt; inputfile &gt; outputfile <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 class="level0"><a href="http://www.ietf.org/rfc/rfc959.txt">RFC 959</a> is FTP
<p class="level0"><a href="http://www.ietf.org/rfc/rfc3986.txt">RFC 3986</a> is URI syntax