Sha256: 61cf819ef5d1e5f497ea71dc4caff843c47cfc918c9fdfd77c339ae3805f09e4

Contents?: true

Size: 880 Bytes

Versions: 4

Compression:

Stored size: 880 Bytes

Contents

# encoding: utf-8

module Infoboxer
  module Tree
    # Represents footnote.
    #
    # Is not rendered in text flow, so, wikitext like
    #
    # ```
    # ...pushed it back into underdevelopment,<ref>...tons of footnote text...</ref> though it
    # nevertheless...
    # ```
    # when parsed and {Node#text} called, will return text like:
    #
    # ```
    # ...pushed it back into underdevelopment, though it nevertheless...
    # ```
    #
    # ...which most times is most reasonable thing to do.
    class Ref < Compound
      # @!attribute [r] name
      def_readers :name

      # @private
      # Internal, used by {Parser}
      def empty?
        # even empty tag should not be dropped!
        false
      end

      def text
        # because we want "clean" text,
        # without references & footnotes messed up in it
        ''
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
infoboxer-0.3.1.pre lib/infoboxer/tree/ref.rb
infoboxer-0.3.0.pre lib/infoboxer/tree/ref.rb
infoboxer-0.3.0 lib/infoboxer/tree/ref.rb
infoboxer-0.2.8 lib/infoboxer/tree/ref.rb