class MarkdownExec::LinkHistory

def initialize

def initialize
  @history = []
end

def peek

Peeks at the most recent LinkState, returns an empty LinkState if stack is empty.
def peek
  @history.last || LinkState.empty
end

def pop

Pops the most recent LinkState off the stack, returns an empty LinkState if stack is empty.
def pop
  @history.pop || LinkState.empty
end

def prior_state_exist?

def prior_state_exist?
  peek.document_filename.present?
end

def push(link_state)

Pushes a LinkState onto the stack.
def push(link_state)
  @history.push(link_state)
end