Sha256: 4390987367051bafa7e6b69c96e54a6454686081b95c8af9c8664ac5b457bf16
Contents?: true
Size: 568 Bytes
Versions: 14
Compression:
Stored size: 568 Bytes
Contents
# frozen_string_literal: true module Stepmod module Utils module Converters class Em < ReverseAdoc::Converters::Base def convert(node, state = {}) content = treat_children(node, state.merge(already_italic: true)) if content.strip.empty? || state[:already_italic] content else "#{content[/^\s*/]}_#{content.strip}_#{content[/\s*$/]}" end end end ReverseAdoc::Converters.register :em, Em.new ReverseAdoc::Converters.register :cite, Em.new end end end
Version data entries
14 entries across 14 versions & 1 rubygems