Skip to content

chore: bump Motoko to v1.8.0#262

Closed
pr-automation-bot-public[bot] wants to merge 1 commit into
mainfrom
infra/bump-motoko-v1.8.0
Closed

chore: bump Motoko to v1.8.0#262
pr-automation-bot-public[bot] wants to merge 1 commit into
mainfrom
infra/bump-motoko-v1.8.0

Conversation

@pr-automation-bot-public
Copy link
Copy Markdown
Contributor

Summary

Automated bump of .sources/motoko from v1.7.0 to v1.8.0.

  • Ran npm run sync:motoko — synced docs from the new release
  • Build passed ✓

Checklist

  • Review synced content for breaking changes
  • Check release notes for API or syntax changes that affect hand-written docs
  • Verify any new sections or renamed files are handled correctly

Sync recommendation

sync from caffeinelabs/motoko doc/md

@marc0olo
Copy link
Copy Markdown
Member

Closing in favor of a clean re-sync after postprocessor bugs are fixed.

Two issues found in this bump:

  1. implicit-parameters.md line 72: (10-contextual-dot.md) — the postprocessor's link regex only matched ./ and ../ relative links; bare numeric-prefix links like this one were passed through unchanged, producing a broken link (the sync script strips numeric prefixes from filenames).
  2. Em-dashes in new prose sections and changelog entries — the postprocessor had no em-dash replacement rule, so they landed in the output.

Both are fixed in PR #263 (infra/fix-sync-motoko). Once that merges, please trigger a new Motoko sync to get a clean v1.8.0 bump.

@marc0olo marc0olo closed this May 19, 2026
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>
@marc0olo marc0olo deleted the infra/bump-motoko-v1.8.0 branch May 19, 2026 20:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant