class Asciidoctor::PreprocessorReader

def peek_line direct = false

Returns nothing if there are no more lines remaining and the include stack is empty.
in the current include context or a parent include context.
Returns the next line of the source data as a String if there are lines remaining

one include on the stack.
stack if the last line has been reached and there's at least
Public: Override the Reader#peek_line method to pop the include
def peek_line direct = false
  if (line = super)
    line
  elsif @include_stack.empty?
    nil
  else
    pop_include
    peek_line direct
  end
end