def add(level, id, text)
      if level == @min_level
        @items << GuideTocEntry.new(self)
        @items.last.label = "#{prefix} <a href='#!/guide/#{id}'>#{text}</a>\n"
      else
        if @items.empty?
          @items << GuideTocEntry.new(self)
        end
        @items.last.add(level-1, id, text)
      end
    end
def add(level, id, text)
      if level == @min_level
        @items << GuideTocEntry.new(self)
        @items.last.label = "#{prefix} <a href='#!/guide/#{id}'>#{text}</a>\n"
      else
        if @items.empty?
          @items << GuideTocEntry.new(self)
        end
        @items.last.add(level-1, id, text)
      end
    end
Adds entry at the corresponding heading level.