lib/md2man/roff.rb in md2man-1.3.2 vs lib/md2man/roff.rb in md2man-1.4.0

- old
+ new

@@ -10,10 +10,11 @@ #--------------------------------------------------------------------------- def preprocess document @ordered_list_id = 0 @table_cells = {} + @h1_seen = false super end def postprocess document super.strip. @@ -55,10 +56,16 @@ end def header text, level macro = case level - when 1 then :TH + when 1 + if @h1_seen + :SH + else + @h1_seen = true + :TH + end when 2 then :SH else :SS end "\n.#{macro} #{text.chomp}\n" end