lib/review/rstbuilder.rb in review-5.2.0 vs lib/review/rstbuilder.rb in review-5.3.0
- old
+ new
@@ -84,10 +84,11 @@
@blank_seen = true
end
private :blank
def result
+ check_printendnotes
solve_nest(@output.string)
end
def headline(level, label, caption)
blank
@@ -122,11 +123,11 @@
blank
@ul_indent += 1
end
def ul_item(lines)
- puts ' ' * (@ul_indent - 1) + "* #{join_lines_to_paragraph(lines)}"
+ puts (' ' * (@ul_indent - 1)) + "* #{join_lines_to_paragraph(lines)}"
end
def ul_end
@ul_indent -= 1
blank
@@ -136,11 +137,11 @@
blank
@ol_indent += 1
end
def ol_item(lines, _num)
- puts ' ' * (@ol_indent - 1) + "#. #{join_lines_to_paragraph(lines)}"
+ puts (' ' * (@ol_indent - 1)) + "#. #{join_lines_to_paragraph(lines)}"
end
def ol_end
@ol_indent -= 1
blank
@@ -363,9 +364,17 @@
blank
end
def inline_fn(id)
" [##{id.sub(' ', '_')}]_ "
+ end
+
+ def inline_endnote(id)
+ " [(#{@chapter.endnote(id).number})]_ "
+ end
+
+ def endnote_item(id)
+ puts ".. [(#{@chapter.endnote(id).number})] #{compile_inline(@chapter.endnote(id).content)}"
end
def compile_ruby(base, ruby)
" :ruby:`#{base}`<#{ruby}>`_ "
end