From 623c44091d29198d3cde97b80c6edacfd2f09fe4 Mon Sep 17 00:00:00 2001 From: Karl-Johan Karlsson Date: Tue, 21 Nov 2023 23:33:20 +0100 Subject: [PATCH] Placate Rubocop Remove redundant whitespace Change a regexp containing only a regular string to a string constant --- lib/fimfic2pdf/ao3/transformer.rb | 2 +- lib/fimfic2pdf/transformer.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/fimfic2pdf/ao3/transformer.rb b/lib/fimfic2pdf/ao3/transformer.rb index 1632938..65d08d4 100644 --- a/lib/fimfic2pdf/ao3/transformer.rb +++ b/lib/fimfic2pdf/ao3/transformer.rb @@ -7,7 +7,7 @@ module AO3 # Transforms AO3 XHTML documents to LaTeX module Transformer def read_title_and_author - unless @conf['story']['title'] and @conf['story']['author'] # rubocop:disable Style/GuardClause + unless @conf['story']['title'] and @conf['story']['author'] # rubocop:disable Style/GuardClause @logger.debug "Not already parsed, reading from file #{@conf['story']['metadata']}" doc = Nokogiri::XML(File.open(@conf['story']['metadata'])) doc.remove_namespaces! diff --git a/lib/fimfic2pdf/transformer.rb b/lib/fimfic2pdf/transformer.rb index ad225ee..bdb98f9 100644 --- a/lib/fimfic2pdf/transformer.rb +++ b/lib/fimfic2pdf/transformer.rb @@ -210,7 +210,7 @@ def prettify_single_quotes(text) def visit_text(node, file) text = unicodify node.text - text.gsub! /\n/, ' ' + text.gsub! "\n", ' ' if /^ *-{4,} *$/.match text visit_hr(node, file) else