Sha256: 38acc781a258f74335208f91adbddee93932f69f89bdcbb00b748700cbd7fe43
Contents?: true
Size: 538 Bytes
Versions: 8
Compression:
Stored size: 538 Bytes
Contents
# frozen_string_literal: true module Stepmod module Utils module Converters class Sub < ReverseAdoc::Converters::Base def convert(node, state = {}) content = treat_children(node, state) return stem_notation(content) if node.parent.name == 'eqn' "#{content[/^\s*/]}~#{content.strip}~#{content[/\s*$/]}" end private def stem_notation(content) "_{#{content}}" end end ReverseAdoc::Converters.register :sub, Sub.new end end end
Version data entries
8 entries across 8 versions & 1 rubygems