Sha256: 53200f4280ff1e96455053ec743a99673d94b1e901401468ec231189efde99c4
Contents?: true
Size: 539 Bytes
Versions: 28
Compression:
Stored size: 539 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
28 entries across 28 versions & 1 rubygems