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