Sha256: fe66f9f1624cd6bb5cd0f81fe29956a5905d73f86da307fec355a292b53e3213
Contents?: true
Size: 420 Bytes
Versions: 14
Compression:
Stored size: 420 Bytes
Contents
module ReverseMarkdown module Converters class Em < 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 register :em, Em.new register :i, Em.new end end
Version data entries
14 entries across 14 versions & 2 rubygems