Skip to content

Commit

Permalink
Merge pull request #105 from debarshiray/wip/rishi/issues-99
Browse files Browse the repository at this point in the history
Silence "warning: cannot select font 'C'" with GNU roff 1.23
  • Loading branch information
cpuguy83 authored Oct 10, 2023
2 parents e8098c3 + d85280d commit f67b5f6
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion md2man/roff.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const (
hruleTag = "\n.ti 0\n\\l'\\n(.lu'\n"
linkTag = "\n\\[la]"
linkCloseTag = "\\[ra]"
codespanTag = "\\fB\\fC"
codespanTag = "\\fB"
codespanCloseTag = "\\fR"
codeTag = "\n.EX\n"
codeCloseTag = "\n.EE\n"
Expand Down
24 changes: 12 additions & 12 deletions md2man/roff_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,10 @@ func TestStrong(t *testing.T) {
".nh\n\n.PP\nmix of **markers__\n",

"**`/usr`** : this folder is named `usr`\n",
".nh\n\n.PP\n\\fB\\fB\\fC/usr\\fR\\fP : this folder is named \\fB\\fCusr\\fR\n",
".nh\n\n.PP\n\\fB\\fB/usr\\fR\\fP : this folder is named \\fBusr\\fR\n",

"**`/usr`** :\n\n this folder is named `usr`\n",
".nh\n\n.PP\n\\fB\\fB\\fC/usr\\fR\\fP :\n\n.PP\nthis folder is named \\fB\\fCusr\\fR\n",
".nh\n\n.PP\n\\fB\\fB/usr\\fR\\fP :\n\n.PP\nthis folder is named \\fBusr\\fR\n",
}
doTestsInline(t, tests)
}
Expand Down Expand Up @@ -168,13 +168,13 @@ func TestEmphasisMix(t *testing.T) {
func TestCodeSpan(t *testing.T) {
tests := []string{
"`source code`\n",
".nh\n\n.PP\n\\fB\\fCsource code\\fR\n",
".nh\n\n.PP\n\\fBsource code\\fR\n",

"` source code with spaces `\n",
".nh\n\n.PP\n\\fB\\fCsource code with spaces\\fR\n",
".nh\n\n.PP\n\\fBsource code with spaces\\fR\n",

"` source code with spaces `not here\n",
".nh\n\n.PP\n\\fB\\fCsource code with spaces\\fRnot here\n",
".nh\n\n.PP\n\\fBsource code with spaces\\fRnot here\n",

"a `single marker\n",
".nh\n\n.PP\na `single marker\n",
Expand All @@ -186,19 +186,19 @@ func TestCodeSpan(t *testing.T) {
".nh\n\n.PP\nmarkers with a space\n",

"`source code` and a `stray\n",
".nh\n\n.PP\n\\fB\\fCsource code\\fR and a `stray\n",
".nh\n\n.PP\n\\fBsource code\\fR and a `stray\n",

"`source *with* _awkward characters_ in it`\n",
".nh\n\n.PP\n\\fB\\fCsource *with* _awkward characters_ in it\\fR\n",
".nh\n\n.PP\n\\fBsource *with* _awkward characters_ in it\\fR\n",

"`split over\ntwo lines`\n",
".nh\n\n.PP\n\\fB\\fCsplit over\ntwo lines\\fR\n",
".nh\n\n.PP\n\\fBsplit over\ntwo lines\\fR\n",

"```multiple ticks``` for the marker\n",
".nh\n\n.PP\n\\fB\\fCmultiple ticks\\fR for the marker\n",
".nh\n\n.PP\n\\fBmultiple ticks\\fR for the marker\n",

"```multiple ticks `with` ticks inside```\n",
".nh\n\n.PP\n\\fB\\fCmultiple ticks `with` ticks inside\\fR\n",
".nh\n\n.PP\n\\fBmultiple ticks `with` ticks inside\\fR\n",
}
doTestsInline(t, tests)
}
Expand Down Expand Up @@ -331,9 +331,9 @@ row one This is a short line.
row|two Col1 should not wrap.
row three no|wrap
row four Inline \fIcursive\fP should not wrap.
row five Inline \fB\fCcode markup\fR should not wrap.
row five Inline \fBcode markup\fR should not wrap.
row six T{
A line that's longer than 30 characters with inline \fB\fCcode markup\fR or \fIcursive\fP should not wrap.
A line that's longer than 30 characters with inline \fBcode markup\fR or \fIcursive\fP should not wrap.
T}
row seven T{
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent eu ipsum eget tortor aliquam accumsan. Quisque ac turpis convallis, sagittis urna ac, tempor est. Mauris nibh arcu, hendrerit id eros sed, sodales lacinia ex. Suspendisse sed condimentum urna, vitae mattis lectus. Mauris imperdiet magna vel purus pretium, id interdum libero.
Expand Down

0 comments on commit f67b5f6

Please sign in to comment.