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