resolveIncludes function

Future<Document> resolveIncludes(
  1. Document document,
  2. Directory currentDirectory,
  3. void onError(
    1. dynamic error
    )?
)

Expands all include[src] tags within the template, and fills in the content of referenced files.

Implementation

Future<Document> resolveIncludes(Document document, Directory currentDirectory, void onError(error)?) async {
  var el = await _expandIncludes(document.root, currentDirectory, onError);
  return new Document(document.doctype, el!);
}