Skip to content

Commit

Permalink
Respond to feedback
Browse files Browse the repository at this point in the history
Respond to doe review feedback.
  • Loading branch information
BillWagner committed Feb 12, 2024
1 parent bfe7c76 commit 6fb6163
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 11 deletions.
5 changes: 0 additions & 5 deletions tools/MarkdownConverter.Tests/MarkdownConverter.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@
<EmbeddedResource Include="*.md" />
</ItemGroup>

<ItemGroup>
<None Remove="emphasis-with-plural.md" />
<None Remove="emphasis-with-plural.xml" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="XMLUnit.Core" Version="2.9.2" />
Expand Down
2 changes: 1 addition & 1 deletion tools/MarkdownConverter.Tests/emphasis-with-plural.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

Rules:

Otherwise, if the namespaces imported by the *using_namespace_directive*s of the namespace declaration contain exactly one type having name `I` and `x` type parameters, then the *namespace_or_type_name* refers to that type constructed with the given type arguments.
Otherwise, if the namespaces imported by the *using_namespace_directive*s of the namespace declaration contain exactly one type having name `I` and `x` type parameters, then the *namespace_or_type_name* refers to that type constructed with the given type arguments.
4 changes: 2 additions & 2 deletions tools/MarkdownConverter.Tests/emphasis-with-plural.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<t space="preserve">using_namespace_directive</t>
</r>
<r>
<t space="preserve">s of the namespace declaration contain exactly one type having name</t>
<t space="preserve">s of the namespace declaration contain exactly one type having name </t>
</r>
<r>
<rPr>
Expand All @@ -46,7 +46,7 @@
<t space="preserve">x</t>
</r>
<r>
<t space="preserve">type parameters, then the</t>
<t space="preserve"> type parameters, then the</t>
</r>
<r>
<t space="preserve"> </t>
Expand Down
8 changes: 5 additions & 3 deletions tools/MarkdownConverter/Converter/MarkdownSourceConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ IEnumerable<OpenXmlCompositeElement> Paragraph2Paragraphs(MarkdownParagraph md)
var cell = new TableCell();

// This logic deals with the special case where
// the cell is meant to cntain bold inline code text.
// the cell is meant to contain bold inline code text.
// The formatter parses it as emphasis, but surrounded
// by single asterisks. We'll detect that and rewrite
// it as the bold we intended.
Expand All @@ -434,7 +434,7 @@ IEnumerable<OpenXmlCompositeElement> Paragraph2Paragraphs(MarkdownParagraph md)
var span2 = para?.body.Skip(1).FirstOrDefault() as MarkdownSpan.Emphasis;
var cellText = span2?.body.FirstOrDefault() as MarkdownSpan.InlineCode;
var trailingAsterisk = span2?.body.Skip(1).FirstOrDefault() as MarkdownSpan.Literal;
if (leadingAsterisk?.text == "*" && cellText != null && trailingAsterisk?.text == "*")
if (leadingAsterisk?.text == "*" && cellText != null && trailingAsterisk?.text == "*")
{
var span = cellText as MarkdownSpan;
var boldSpan = MarkdownSpan.NewStrong(ListModule.OfSeq([span]), default);
Expand Down Expand Up @@ -943,7 +943,9 @@ IEnumerable<OpenXmlElement> Literal2Elements(string literal, bool isNested, bool
}
}

// Note for future PR: "function_members", "format_strings_1", and "format_strings_2" are the
// Note: See issue https://github.com/dotnet/csharpstandard/issues/1046.
// In PR https://github.com/dotnet/csharpstandard/pull/584, most of the custom tables were removed.
// "function_members", "format_strings_1", and "format_strings_2" are the
// only special cases still used. The others can be safely removed in a future PR.
IEnumerable<OpenXmlCompositeElement> GenerateCustomBlockElements(string customBlockId, MarkdownParagraph.InlineHtmlBlock block) => customBlockId switch
{
Expand Down

0 comments on commit 6fb6163

Please sign in to comment.