Skip to content

Commit 6300783

Browse files
committed
probably fix guide page
1 parent 759da15 commit 6300783

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

SharpDenizenTools/MetaHandlers/MetaDocsLoader.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -206,17 +206,17 @@ public static void ReadGuides(MetaDocs docs, HttpClient client)
206206
string subpageContent = StringConversionHelper.UTF8Encoding.GetString(client.GetByteArrayAsync(DENIZEN_GUIDE_SOURCE + subPage).Result);
207207
int pageTitleIndex = subpageContent.IndexOf("<title>");
208208
int pageTitleEndIndex = subpageContent.IndexOf("</title>");
209-
int tableIndex = subpageContent.IndexOf("<div class=\"contents local topic\" id=\"table-of-contents\">");
209+
int tableIndex = subpageContent.IndexOf("<nav class=\"contents local\" id=\"table-of-contents\">");
210210
if (pageTitleIndex == -1 || pageTitleEndIndex == -1 || tableIndex == -1)
211211
{
212-
docs.LoadErrors.Add("Guide sub-page did not match expected format (title or table of contents div missing).");
212+
docs.LoadErrors.Add("Guide sub-page did not match expected format (title or table of contents nav elem missing).");
213213
return;
214214
}
215215
string pageTitle = subpageContent[(pageTitleIndex + "<title>".Length)..pageTitleEndIndex].Before(" &mdash");
216-
int tableEndIndex = subpageContent.IndexOf("</div>", tableIndex);
216+
int tableEndIndex = subpageContent.IndexOf("</nav>", tableIndex);
217217
if (tableEndIndex == -1)
218218
{
219-
docs.LoadErrors.Add("Guide sub-page did not match expected format (table of contents div never ends).");
219+
docs.LoadErrors.Add("Guide sub-page did not match expected format (table of contents nav elem never ends).");
220220
return;
221221
}
222222
string[] table = subpageContent[tableIndex..tableEndIndex].Replace('\r', '\n').Split('\n');

0 commit comments

Comments
 (0)