Skip to content

fix(markdown-satteri): clarify smartPunctuation default#17314

Open
barry166 wants to merge 1 commit into
withastro:mainfrom
barry166:barry/satteri-smart-punctuation-jsdoc-17305
Open

fix(markdown-satteri): clarify smartPunctuation default#17314
barry166 wants to merge 1 commit into
withastro:mainfrom
barry166:barry/satteri-smart-punctuation-jsdoc-17305

Conversation

@barry166

@barry166 barry166 commented Jul 7, 2026

Copy link
Copy Markdown

Summary

  • add an Astro-specific SatteriFeatures type that overrides the upstream smartPunctuation JSDoc
  • export the type so consumers see the corrected default in satteri({ features })

Fixes #17305.

Testing

  • corepack pnpm --filter @astrojs/prism build
  • corepack pnpm --filter @astrojs/internal-helpers build
  • corepack pnpm --filter @astrojs/markdown-satteri build
  • corepack pnpm --filter @astrojs/markdown-satteri test
  • corepack pnpm exec prettier packages/markdown/satteri/src/processor.ts packages/markdown/satteri/src/index.ts --check
  • git diff --check

Notes

AI-assisted. I manually reviewed the final diff and verification output.

Astro enables smart punctuation by default before merging user feature overrides, but the public Satteri processor options reused upstream Satteri JSDoc that says smartPunctuation defaults to false. Override only that feature property in the exported Astro type so IDE hovers match Astro behavior without changing runtime defaults.

Constraint: Upstream satteri default remains false, while Astro's markdown wrapper defaults smartypants to true.

Rejected: Change runtime feature defaults | issue is documentation/type metadata only.

Confidence: high

Scope-risk: narrow

Tested: corepack pnpm --filter @astrojs/prism build; corepack pnpm --filter @astrojs/internal-helpers build; corepack pnpm --filter @astrojs/markdown-satteri build; corepack pnpm --filter @astrojs/markdown-satteri test; prettier check on touched files; git diff --check

Not-tested: IDE hover rendering manually in an editor
@changeset-bot

changeset-bot Bot commented Jul 7, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 1afe751

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions github-actions Bot added the feat: markdown Related to Markdown (scope) label Jul 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feat: markdown Related to Markdown (scope)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

@astrojs/markdown-satteri: JSDoc shows that the smartPunctuation default is false

1 participant