chore: bump Motoko to v1.8.0#262
Closed
pr-automation-bot-public[bot] wants to merge 1 commit into
Closed
Conversation
Member
|
Closing in favor of a clean re-sync after postprocessor bugs are fixed. Two issues found in this bump:
Both are fixed in PR #263 ( |
marc0olo
added a commit
that referenced
this pull request
May 19, 2026
…stprocessor Two postprocessor bugs that caused PR #262 to produce broken links and em-dashes in synced Motoko docs: 1. Link regex only matched `./` and `../` relative links. Bare numeric-prefix links like `10-contextual-dot.md` (used by upstream in v1.8.0) were never passed to `rewriteLink` and remained broken. The updated regex also matches `\d+-name.md` patterns; `rewriteLink` already strips numeric prefixes and resolves slugs at line 214. 2. Em-dashes (` — `, banned per style guide) were not replaced during sync. Added a prose-only replacement pass (` — ` → `: `) after the link rewrites, with a fenced-code-block split so code comments like `// ERROR — not static` are preserved verbatim. Both fixes are defensive: they become no-ops once upstream PR caffeinelabs/motoko#6132 (§5 numeric prefixes, §8 em-dashes) merges. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
marc0olo
added a commit
that referenced
this pull request
May 19, 2026
## Summary Two postprocessor bugs in `scripts/postprocess-motoko.mjs` that caused PR #262 to produce broken links and em-dashes in synced Motoko docs. ### Bug 1: Bare numeric-prefix links not rewritten The `linkRe` regex only matched relative links starting with `./` or `../`. Bare links like `10-contextual-dot.md` (used by upstream in v1.8.0) were never passed to `rewriteLink` and landed in the synced output unchanged — a broken link, since the sync script strips numeric prefixes from filenames. Fix: extend `linkRe` to also match `\d+-name.md` patterns. The existing `rewriteLink()` at line 214 already strips numeric prefixes and resolves slugs. ### Bug 2: Em-dashes not replaced Em-dashes (` — `) are banned per the style guide, but the postprocessor had no replacement rule. 22 instances were present in already-synced v1.7.0 files. Fix: added a prose-only em-dash replacement pass (` — ` → `: `) after the link rewrites. Uses a fenced-code-block split so code comments like `// ERROR — not static` are preserved verbatim. ### Both fixes are defensive They become no-ops once `caffeinelabs/motoko#6132` merges: - §5 removes numeric prefixes from filenames and §6 updates all links — no `\d+-name.md` links in source - §8 removes em-dashes from prose — nothing to replace ## Next steps after this merges Trigger a new Motoko sync to get a clean v1.8.0 bump (PR #262 was closed due to these bugs). ## Sync recommendation `hand-written` (postprocessor infrastructure) Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Summary
Automated bump of
.sources/motokofromv1.7.0tov1.8.0.npm run sync:motoko— synced docs from the new releaseChecklist
Sync recommendation
sync from caffeinelabs/motoko doc/md