Skip to content

Commit

Permalink
Unify all alternating font face macros under one rule
Browse files Browse the repository at this point in the history
  • Loading branch information
bonsaiviking authored and bagder committed Dec 13, 2019
1 parent 9458369 commit be2eb4c
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions roffit
Original file line number Diff line number Diff line change
Expand Up @@ -388,8 +388,7 @@ sub parsefile {
$indentlevel=0;
$within_tp=0;
}
elsif(($keyword =~ /^B$/i) || ($keyword =~ /^BI$/i)) {
# Make B and BI the same for simplicity
elsif($keyword =~ /^B$/i) {
$rest =~ s/\"//g; # cut off quotes
$rest = do_encode($rest);

Expand All @@ -403,7 +402,7 @@ sub parsefile {
push @p, "\n";
}
}
elsif(($keyword =~ /^I$/i) || ($keyword =~ /^IR$/i)) {
elsif($keyword =~ /^I$/i) {
$rest =~ s/\"//g; # cut off quotes
$rest = do_encode($rest);
push @p, "<span class=\"emphasis\">$rest</span> ";
Expand Down Expand Up @@ -504,16 +503,14 @@ sub parsefile {
# We don't support this
push @out, "See the $rest man page.\n";
}
elsif($keyword eq "br") {
push @p, "<br>";
}
elsif($keyword =~ /^([RIB])([RIB])$/) {
# Alternating font faces
my @ff = ($1, $2);

if(!$rest) {
# A stand-alone .br will become a line break
#print $debugFH "ALERT: bare BR\n";
push @p, "<br>";
}
else {
if($rest) {
my @all = split_quoted($rest);
my $fi = 0;
my @applied;
Expand Down

0 comments on commit be2eb4c

Please sign in to comment.