lib/stepmod/utils/converters/strong.rb in stepmod-utils-0.3.5 vs lib/stepmod/utils/converters/strong.rb in stepmod-utils-0.3.7

- old
+ new

@@ -2,18 +2,19 @@ module Stepmod module Utils module Converters class Strong < ReverseAdoc::Converters::Base - BLANK_CHARS = "{blank}".freeze + BLANK_CHARS = "{blank}" def convert(node, state = {}) content = treat_children(node, state.merge(already_strong: true)) if content.strip.empty? || state[:already_strong] content else - handle_express_escape_seq(node, "#{content[/^\s*/]}*#{content.strip}*#{content[/\s*$/]}") + handle_express_escape_seq(node, + "#{content[/^\s*/]}*#{content.strip}*#{content[/\s*$/]}") end end private @@ -28,14 +29,14 @@ res end def braces_sibling?(sibling, end_of_text = false) match = end_of_text ? /\($/ : /^\)/ - sibling && sibling.text? && sibling.text =~ match + sibling&.text? && sibling.text =~ match end end ReverseAdoc::Converters.register :strong, Strong.new ReverseAdoc::Converters.register :b, Strong.new end end -end \ No newline at end of file +end