lib/md2man/roff.rb in md2man-1.3.0 vs lib/md2man/roff.rb in md2man-1.3.1
- old
+ new
@@ -10,11 +10,11 @@
#---------------------------------------------------------------------------
def preprocess document
@ordered_list_id = 0
@table_cells = {}
- document
+ super
end
def postprocess document
super.strip.
@@ -40,15 +40,15 @@
def normal_paragraph text
"\n.PP\n#{text}\n"
end
def block_code code, language
- "\n.nf\n#{code.chomp}\n.fi\n"
+ block_quote "\n.nf\n#{super.chomp}\n.fi\n"
end
def block_quote quote
- "\n.RS\n#{remove_leading_pp(quote).chomp}\n.RE\n"
+ "\n.PP\n.RS\n#{remove_leading_pp(quote).chomp}\n.RE\n"
end
def block_html html
warn "md2man/roff: block_html not implemented: #{html.inspect}"
end
@@ -154,11 +154,11 @@
end
def codespan code
# NOTE: this double font sequence gives us the best of both worlds:
# man(1) shows it in bold and `groff -Thtml` shows it in monospace
- "\\fB\\fC#{code}\\fR"
+ "\\fB\\fC#{super}\\fR"
end
def link link, title, content
content +
if link =~ /^mailto:/
@@ -221,10 +221,10 @@
def encode_table_row row
row + TABLE_ROW_DELIM
end
def encode_table_cell cell
- key = cell.object_id.to_s
+ key = encode(cell)
@table_cells[key] = cell
key + TABLE_CELL_DELIM
end
def entity_to_unicode entity