public static void UpdateFileMap(DocumentBuildContext context, string outputDirectory, TemplateCollection templateCollection) { //update internal XrefMap if (context.XRefSpecMap != null) { foreach (var pair in context.XRefSpecMap) { string targetFilePath; if (context.FileMap.TryGetValue(pair.Value.Href, out targetFilePath)) { pair.Value.Href = targetFilePath; } else { Logger.LogWarning($"{pair.Value.Href} is not found in .filemap"); } } } context.SetExternalXRefSpec(); }