Fix Preach My Gospel links and reference formats for 2023 edition#4
Merged
coderkearns merged 1 commit intomasterfrom Mar 23, 2026
Merged
Conversation
…rmats Co-authored-by: coderkearns <80931347+coderkearns@users.noreply.github.com> Agent-Logs-Url: https://github.com/coderkearns/obsidian-autoreference-scriptures/sessions/4425ee6f-0544-4121-ac6c-bf3396e4029b
Copilot created this pull request from a session on behalf of
coderkearns
March 23, 2026 05:02
View session
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PMG URLs were pointing to the old guide slug and using a flat
chapter-Npath scheme. The 2023 edition uses a new URL base with numbered path prefixes and nested sub-paths for Chapter 3's sections.URL mapping (
books.ts)urlBase+chapterPrefix: 'chapter-'with achapterMaplookup table onScriptureBookpreach-my-gospel-2023; each chapter key maps to its exact path segment (e.g.'3.3' → '04-chapter-3/08-chapter-3-lesson-1')Reference format parsing (
parser.ts)page N/pg. Nsupport entirely (was PMG-only anyway)numberPrefixwith a richerchapterPartalternation tried in specificity order:Message,IntroL1–L43B(invite page)3.1–3.6chapter/ch./#prefix + digitsURL building (
urlBuilder.ts)Added
normalizePmgSection()to canonicalize raw captures to chapterMap keys:3/3.1/chapter 33.104-chapter-3/06-chapter-3-intro3B/3.23.204-chapter-3/07-chapter-3-inviteL1/3.33.304-chapter-3/08-chapter-3-lesson-1Messagemessage01-first-presidency-messageWhen
chapterMapis present,buildUrluses the map directly and skips verse anchors (PMG pages don't have paragraph-level anchors).