private void pushMarkedInclude(Document document, PreprocessorReader reader, String target,
                                       StringBuilder includedText, int firstLine, Path includee,
                                       Map<String, Object> attributes) {
          // this padding is used as the start of the marker line, because at the time the tree processor
          // runs, the indenting magic already happened, and if the marker line does not start with the right padding,
          // the code might not be unindented enough, or we would need to implement own indent-handling logic for
          // the including blocks
          int padding = includedText
            .toString()
            .lines()
            .mapToLong(line -> line.chars().takeWhile(c -> c == ' ').count())
            .filter(c -> c > 0)
            .mapToInt(Math::toIntExact)
            .min()
            .orElse(0);

          // push to the top of the included text the include source marker looking like
          // "<padding for not disturbing indent handling><includeSourceMarker><link to file and line on GitHub><includeSourceMarker>\n"
          includedText.insert(0, '\n');
          includedText.insert(0, includeSourceMarker);
          includedText.insert(0, firstLine);
          includedText.insert(0, "#L");
          includedText.insert(0, target.substring(3));
          includedText.insert(0, '/');
          includedText.insert(0, document.getAttribute("commit-ish", "master"));
          includedText.insert(0, '/');
          includedText.insert(0, document.getAttribute("github-blob-base"));
          includedText.insert(0, includeSourceMarker.indent(padding).stripTrailing());

          reader.pushInclude(includedText.toString(), includee.getFileName().toString(),
            includee.getParent().toString(), firstLine, attributes);
        }
Push the include source marker line containing the GitHub link and then the included text to the reader.

@param document The currently rendered document
@param reader The current reader
@param target The target of the include directive, i.e. the included file starting with {@code ../}
@param includedText The included text
@param firstLine The line within the includee where the first included line is found
@param includee The resolved includee
@param attributes The attributes to forward
build-logic/asciidoc-extensions/src/main/java/org/spockframework/plugins/asciidoctor/IncludedSourceLinker.java