Sha256: 186e7fbf00bc1dc3b3fdc885a232a1b50ac834ecb12d2ec36c104461b7162cbb
Contents?: true
Size: 533 Bytes
Versions: 14
Compression:
Stored size: 533 Bytes
Contents
# frozen_string_literal: true module Stepmod module Utils module Converters class Sub < Stepmod::Utils::Converters::Base def convert(node, state = {}) content = treat_children(node, state) return stem_notation(content) if state[:equation] "#{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
14 entries across 14 versions & 1 rubygems