diff --git a/internal/topdata/wiki_deploy_test.go b/internal/topdata/wiki_deploy_test.go index b437dc5..dd6ba88 100644 --- a/internal/topdata/wiki_deploy_test.go +++ b/internal/topdata/wiki_deploy_test.go @@ -156,9 +156,9 @@ func TestMergeManagedContentPreservesUserTopAndBottomSections(t *testing.T) { `
User-written overview.
`, ``, `Old generated body.
`, - ``, - `User note.
`, - ``, + ``, + `User-written bottom content.
`, + ``, ``, }, "\n") generated := strings.Join([]string{ @@ -169,16 +169,16 @@ func TestMergeManagedContentPreservesUserTopAndBottomSections(t *testing.T) { ``, ``, `New generated body.
`, - ``, - `User-written overview.
", - "User note.
", + "User-written bottom content.
", "New generated body.
", } { if !strings.Contains(merged, expected) { @@ -393,10 +393,9 @@ func TestDeployWikiAdoptsExistingNodeBBPageWhenManifestIsMissingWithoutCreate(tGenerated acolyte page
- -Old acolyte page
- -Keep this remote note.
- + ` createCalls := 0 @@ -500,14 +498,9 @@ func TestDeployWikiMergesHTMLManagedAndManualRegions(t *testing.T) {Generated athletics page
- -Old generated text
- -Keep this human note.
- + ` manifestPath := filepath.Join(root, "deploy-manifest.json") if err := saveDeployManifest(manifestPath, wikiDeployManifest{ @@ -572,9 +564,12 @@ func TestDeployWikiMergesHTMLManagedAndManualRegions(t *testing.T) { if result.Updated != 1 { t.Fatalf("expected one update, got %#v", result) } - if !containsAll(updated, "Generated athletics page
", "Keep this human note.
", `manual:start id="see_also"`) { + if !containsAll(updated, "Generated athletics page
", "Keep this human note.
", `manual:start id="user_bottom"`) { t.Fatalf("expected update to replace managed HTML and preserve/bootstrap manual regions:\n%s", updated) } + if strings.Contains(updated, `manual:start id="notes"`) || strings.Contains(updated, `manual:start id="see_also"`) { + t.Fatalf("expected update to omit legacy split bottom manual regions:\n%s", updated) + } } func TestDeployWikiUpdateAcquiresWestgateWikiEditLock(t *testing.T) { diff --git a/internal/topdata/wiki_native.go b/internal/topdata/wiki_native.go index fc54aa8..c2f090c 100644 --- a/internal/topdata/wiki_native.go +++ b/internal/topdata/wiki_native.go @@ -246,7 +246,7 @@ func loadWikiManualSections(p *project.Project) []wikiManualSection { switch section.ID { case "user_top": section.Alias = "UserTopSection" - case "notes": + case "user_bottom": section.Alias = "UserBottomSection" } } diff --git a/internal/topdata/wiki_native_test.go b/internal/topdata/wiki_native_test.go index cf30351..4d2acbf 100644 --- a/internal/topdata/wiki_native_test.go +++ b/internal/topdata/wiki_native_test.go @@ -59,8 +59,11 @@ func TestBuildNativeGeneratesAndSkipsWikiPages(t *testing.T) { if strings.Contains(text, "[//]: #") || strings.Contains(text, "Skill Points: 4
", "This is a new class!", "Acolyte description.
", - ``, + ``, } { if !strings.Contains(got, expected) { t.Fatalf("expected %q in rendered template:\n%s", expected, got) diff --git a/internal/topdata/wiki_preserve.go b/internal/topdata/wiki_preserve.go index 5359bab..f5f67d6 100644 --- a/internal/topdata/wiki_preserve.go +++ b/internal/topdata/wiki_preserve.go @@ -49,7 +49,6 @@ func normalizePreservedSectionBodies(content string) string { func defaultWikiManualSections() []wikiManualSection { return []wikiManualSection{ {ID: "user_top", Alias: "UserTopSection", Heading: "", InitialHTML: ""}, - {ID: "notes", Alias: "UserBottomSection", Heading: "Notes", InitialHTML: "