Skip to content

Commit a167e25

Browse files
committed
Handle edge case with tables
1 parent fe0b890 commit a167e25

2 files changed

Lines changed: 10 additions & 7 deletions

File tree

.vscode/launch.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"request": "launch",
1111
"preLaunchTask": "build",
1212
// If you have changed target frameworks, make sure to update the program path.
13-
"program": "${workspaceFolder}/src/bin/Debug/net8.0/GenerateTOC.dll",
13+
"program": "${workspaceFolder}/src/bin/Debug/net10.0/GenerateTOC.dll",
1414
"args": [
1515
"--api-docs",
1616
"C:/Source/Repos/microsoft-graph-docs/api-reference/v1.0/api",
@@ -42,7 +42,7 @@
4242
"request": "launch",
4343
"preLaunchTask": "build",
4444
// If you have changed target frameworks, make sure to update the program path.
45-
"program": "${workspaceFolder}/src/bin/Debug/net8.0/GenerateTOC.dll",
45+
"program": "${workspaceFolder}/src/bin/Debug/net10.0/GenerateTOC.dll",
4646
"args": [
4747
"--api-docs",
4848
"C:/Source/Repos/microsoft-graph-docs/api-reference/beta/api",
@@ -76,7 +76,7 @@
7676
"request": "launch",
7777
"preLaunchTask": "build",
7878
// If you have changed target frameworks, make sure to update the program path.
79-
"program": "${workspaceFolder}/tools/split-toc/bin/Debug/net8.0/SplitTOC.dll",
79+
"program": "${workspaceFolder}/tools/split-toc/bin/Debug/net10.0/SplitTOC.dll",
8080
"args": [
8181
"--toc",
8282
"C:/Source/Repos/microsoft-graph-docs/api-reference/beta/toc.yml",
@@ -99,7 +99,7 @@
9999
"request": "launch",
100100
"preLaunchTask": "build",
101101
// If you have changed target frameworks, make sure to update the program path.
102-
"program": "${workspaceFolder}/tools/toc-scan/bin/Debug/net8.0/TOCScan.dll",
102+
"program": "${workspaceFolder}/tools/toc-scan/bin/Debug/net10.0/TOCScan.dll",
103103
"args": [
104104
"--api-docs",
105105
"C:/Source/Repos/microsoft-graph-docs/api-reference/v1.0/api",
@@ -123,7 +123,7 @@
123123
"request": "launch",
124124
"preLaunchTask": "build",
125125
// If you have changed target frameworks, make sure to update the program path.
126-
"program": "${workspaceFolder}/tools/csdl-to-mapping/bin/Debug/net8.0/CSDL2Mapping.dll",
126+
"program": "${workspaceFolder}/tools/csdl-to-mapping/bin/Debug/net10.0/CSDL2Mapping.dll",
127127
"args": [
128128
"--csdl",
129129
"C:/Source/Repos/graph-workloads/Workloads/Microsoft.Intune.Updates/override/schema-Prod-beta.csdl"

src/Docs/Extensions/MarkdigExtensions.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,11 @@ public static List<string> GetColumnHeadings(this Table table)
5959

6060
foreach (var headerCell in headerCells)
6161
{
62-
var text = headerCell.Descendants<LiteralInline>().First();
63-
headings.Add(text.TextValue());
62+
var text = headerCell.Descendants<LiteralInline>().FirstOrDefault()?.TextValue();
63+
if (!string.IsNullOrEmpty(text))
64+
{
65+
headings.Add(text);
66+
}
6467
}
6568

6669
return headings;

0 commit comments

Comments
 (0)