[Feature] Fix comments and other code review comments
This commit is contained in:
parent
b5601cfb66
commit
ce5f9f9af7
|
@ -15,7 +15,7 @@ using Dbg = System.Management.Automation;
|
|||
namespace Microsoft.PowerShell.Commands
|
||||
{
|
||||
/// <summary>
|
||||
/// Converts a markdown string to a MarkdownInfo object.
|
||||
/// Converts a Markdown string to a MarkdownInfo object.
|
||||
/// The conversion can be done into a HTML text or VT100 encoding string.
|
||||
/// </summary>
|
||||
[Cmdlet(
|
||||
|
@ -26,28 +26,28 @@ namespace Microsoft.PowerShell.Commands
|
|||
public class ConvertFromMarkdownCommand : PSCmdlet
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets path to the file to convert from markdown to MarkdownInfo.
|
||||
/// Gets or sets path to the file to convert from Markdown to MarkdownInfo.
|
||||
/// </summary>
|
||||
[ValidateNotNullOrEmpty]
|
||||
[Parameter(ParameterSetName = PathParameterSet, Mandatory = true)]
|
||||
public string[] Path { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the path to the file to convert from markdown to MarkdownInfo.
|
||||
/// Gets or sets the path to the file to convert from Markdown to MarkdownInfo.
|
||||
/// </summary>
|
||||
[ValidateNotNullOrEmpty]
|
||||
[Parameter(ParameterSetName = LiteralPathParameterSet, Mandatory = true)]
|
||||
public string[] LiteralPath { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the InputObject of type System.IO.FileInfo or string with content to convert from markdown to MarkdownInfo.
|
||||
/// Gets or sets the InputObject of type System.IO.FileInfo or string with content to convert from Markdown to MarkdownInfo.
|
||||
/// </summary>
|
||||
[ValidateNotNullOrEmpty]
|
||||
[Parameter(ParameterSetName = InputObjParamSet, Mandatory = true, ValueFromPipeline = true)]
|
||||
public PSObject InputObject { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets if the markdown document should be converted to a VT100 encoded string.
|
||||
/// Gets or sets if the Markdown document should be converted to a VT100 encoded string.
|
||||
/// </summary>
|
||||
[Parameter]
|
||||
public SwitchParameter AsVT100EncodedString { get; set; }
|
||||
|
|
|
@ -241,7 +241,7 @@ namespace Microsoft.PowerShell.Commands
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Implements the cmdlet for getting the markdown options that are set.
|
||||
/// Implements the cmdlet for getting the Markdown options that are set.
|
||||
/// </summary>
|
||||
[Cmdlet(
|
||||
VerbsCommon.Get, "MarkdownOption",
|
||||
|
|
|
@ -45,9 +45,7 @@ namespace Microsoft.PowerShell.MarkdownRender
|
|||
{
|
||||
foreach (var subListItem in subList)
|
||||
{
|
||||
var subListItemBlock = subListItem as ListItemBlock;
|
||||
|
||||
if (subListItemBlock != null)
|
||||
if (subListItem is ListItemBlock subListItemBlock)
|
||||
{
|
||||
foreach (var line in subListItemBlock)
|
||||
{
|
||||
|
|
|
@ -10,7 +10,7 @@ using Markdig.Syntax;
|
|||
namespace Microsoft.PowerShell.MarkdownRender
|
||||
{
|
||||
/// <summary>
|
||||
/// Type of conversion from markdown.
|
||||
/// Type of conversion from Markdown.
|
||||
/// </summary>
|
||||
[Flags]
|
||||
public enum MarkdownConversionType
|
||||
|
@ -27,7 +27,7 @@ namespace Microsoft.PowerShell.MarkdownRender
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Object representing the conversion from markdown.
|
||||
/// Object representing the conversion from Markdown.
|
||||
/// </summary>
|
||||
public class MarkdownInfo
|
||||
{
|
||||
|
@ -42,20 +42,20 @@ namespace Microsoft.PowerShell.MarkdownRender
|
|||
public string VT100EncodedString { get; internal set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the AST of the markdown string.
|
||||
/// Gets the AST of the Markdown string.
|
||||
/// </summary>
|
||||
public Markdig.Syntax.MarkdownDocument Tokens { get; internal set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Class to convert a markdown string to VT100, HTML or AST.
|
||||
/// Class to convert a Markdown string to VT100, HTML or AST.
|
||||
/// </summary>
|
||||
public sealed class MarkdownConverter
|
||||
{
|
||||
/// <summary>
|
||||
/// Convert from markdown string to VT100 encoded string or HTML. Returns MarkdownInfo object.
|
||||
/// Convert from Markdown string to VT100 encoded string or HTML. Returns MarkdownInfo object.
|
||||
/// </summary>
|
||||
/// <param name="markdownString">String with markdown content to be converted.</param>
|
||||
/// <param name="markdownString">String with Markdown content to be converted.</param>
|
||||
/// <param name="conversionType">Specifies type of conversion, either VT100 or HTML.</param>
|
||||
/// <param name="optionInfo">Specifies the rendering options for VT100 rendering.</param>
|
||||
/// <returns>MarkdownInfo object with the converted output.</returns>
|
||||
|
|
|
@ -10,7 +10,7 @@ using Markdig.Syntax;
|
|||
namespace Microsoft.PowerShell.MarkdownRender
|
||||
{
|
||||
/// <summary>
|
||||
/// Class to represent color preference options for various markdown elements.
|
||||
/// Class to represent color preference options for various Markdown elements.
|
||||
/// </summary>
|
||||
public sealed class MarkdownOptionInfo
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue