Skip to content

Commit

Permalink
Merge pull request #94 from kolyshkin/no-monospace
Browse files Browse the repository at this point in the history
Do not typeset table headings in monospaced font
  • Loading branch information
cpuguy83 authored Apr 27, 2023
2 parents 6cc2302 + 65a740a commit 31a4ffb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions md2man/roff.go
Original file line number Diff line number Diff line change
Expand Up @@ -261,15 +261,15 @@ func (r *roffRenderer) handleTableCell(w io.Writer, node *blackfriday.Node, ente
start = "\t"
}
if node.IsHeader {
start += codespanTag
start += strongTag
} else if nodeLiteralSize(node) > 30 {
start += tableCellStart
}
out(w, start)
} else {
var end string
if node.IsHeader {
end = codespanCloseTag
end = strongCloseTag
} else if nodeLiteralSize(node) > 30 {
end = tableCellEnd
}
Expand Down
6 changes: 3 additions & 3 deletions md2man/roff_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ func TestTable(t *testing.T) {
allbox;
l l
l l .
\fB\fCAnimal\fR \fB\fCColor\fR
\fBAnimal\fP \fBColor\fP
elephant T{
Gray. The elephant is very gray.
T}
Expand Down Expand Up @@ -287,7 +287,7 @@ func TestTableWithEmptyCell(t *testing.T) {
allbox;
l l l
l l l .
\fB\fCCol1\fR \fB\fCCol2\fR \fB\fCCol3\fR
\fBCol1\fP \fBCol2\fP \fBCol3\fP
row one
row two x
.TE
Expand Down Expand Up @@ -315,7 +315,7 @@ func TestTableWrapping(t *testing.T) {
allbox;
l l
l l .
\fB\fCCol1\fR \fB\fCCol2\fR
\fBCol1\fP \fBCol2\fP
row one This is a short line.
row|two Col1 should not wrap.
row three no|wrap
Expand Down

0 comments on commit 31a4ffb

Please sign in to comment.