Sha256: a59df99d6524731596fe54150293589fd878fd49936890b463d7cc31d9faccd8
Contents?: true
Size: 513 Bytes
Versions: 10
Compression:
Stored size: 513 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 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
10 entries across 10 versions & 1 rubygems