lib/review/textutils.rb in review-5.0.0 vs lib/review/textutils.rb in review-5.1.0

- old
+ new

@@ -49,10 +49,11 @@ tail = line1[-1] head = line2[0] if tail.nil? || head.nil? return nil end + space = true # rule 2 if %i[F W H].include?(Unicode::Eaw.property(tail)) && %i[F W H].include?(Unicode::Eaw.property(head)) && tail !~ /\p{Hangul}/ && head !~ /\p{Hangul}/ @@ -84,27 +85,18 @@ def join_lines_to_paragraph(lines) unless @book.config['join_lines_by_lang'] return lines.join end + lazy = true lang = 'ja' 0.upto(lines.size - 2) do |n| if add_space?(lines[n], lines[n + 1], lang, lazy) lines[n] += ' ' end end lines.join - end - - def defer_math_image(str, path, key) - # for Re:VIEW >3 - File.open(File.join(File.dirname(path), "__IMGMATH_BODY__#{key}.tex"), 'w') do |f| - f.puts str - end - File.open(File.join(File.dirname(path), '__IMGMATH_BODY__.map'), 'a+') do |f| - f.puts key - end end private # remove elements at the back of `lines` if element is empty string