Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optionally enable Markdig extensions that are not included by default in DocFX #7833

Merged
merged 5 commits into from
Jan 17, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Remove unnecessary helper method
  • Loading branch information
jakraft committed Jan 14, 2022
commit 86cd93343b7e16a6c3581ea97949642e3e78cb46
Original file line number Diff line number Diff line change
Expand Up @@ -172,19 +172,5 @@ public static MarkdownPipelineBuilder UseNoloc(this MarkdownPipelineBuilder pipe
pipeline.Extensions.AddIfNotAlready(new NolocExtension());
return pipeline;
}

/// <summary>
/// Checks the extensions dictionary if an extension is enabled.
/// </summary>
/// <param name="extensionPropertyName">The property name for the extension</param>
/// <param name="extensions">The read-only dictionary containing the extensions</param>
/// <returns>True if the extension is in the dictionary and its value is set to true. False, otherwise.</returns>
private static bool IsExtensionEnabled(string extensionPropertyName, IReadOnlyDictionary<string, object> extensions)
{
object enableExtensionObj = null;
extensions?.TryGetValue(extensionPropertyName, out enableExtensionObj);

return enableExtensionObj is bool enabled && enabled;
}
}
}