Sha256: 096d44baa7146101a5777d2db5f8da83de8d33325d9e7381b2111f51ed68f894
Contents?: true
Size: 516 Bytes
Versions: 13
Compression:
Stored size: 516 Bytes
Contents
# frozen_string_literal: true module Stepmod module Utils module Converters class Sup < 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 def stem_notation(content) "^{#{content}}" end end ReverseAdoc::Converters.register :sup, Sup.new end end end
Version data entries
13 entries across 13 versions & 1 rubygems