class Asciidoctor::PreprocessorReader

def exceeds_max_depth?

will not be exceeded, and the relative max include depth if the current max depth will be exceed.
Returns nil if no max depth is set and includes are disabled (max-include-depth=0), false if the current max depth

Public: Reports whether pushing an include on the include stack exceeds the max include depth.
def exceeds_max_depth?
  @maxdepth && @include_stack.size >= @maxdepth[:curr] && @maxdepth[:rel]
end