Skip to content

Conversation

@trueberryless
Copy link
Contributor

@trueberryless trueberryless commented Jan 29, 2026

Changes

Adapt markdown.smartypants configuration to allow passing more detailed object.

I recreated the types for this new option object, as remark-smartypants unfortunately doesn't reexport the Option type from retext-smartypants... Maybe someone has a clever idea how to do this without a redefinition (but we need the Zod schema as well anyways) 🤔

Related: withastro/roadmap#1027

Testing

Added new e2e test cases covering some of the options, as I think the remark-smartypants plugin should verify that all options work, so therefore, not all are covered here.

Docs

I adapted the https://github.com/withastro/astro/blob/main/packages/astro/src/types/public/config.ts file which will autogenerate the new configuration reference.

I set the Astro version for the new docs to 5.18.0 as I assume, this could be reviewed until the next minor, as 5.17.0 was just released, but no pressure or rush, we can adopt this version number if it needs more time or is not the priority right now!

@changeset-bot
Copy link

changeset-bot bot commented Jan 29, 2026

🦋 Changeset detected

Latest commit: fb96265

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

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

@github-actions github-actions bot added feat: markdown Related to Markdown (scope) pkg: astro Related to the core `astro` package (scope) docs pr labels Jan 29, 2026
@trueberryless trueberryless changed the title feat(markdown/remark): Smartypants config Jan 29, 2026
@codspeed-hq
Copy link

codspeed-hq bot commented Jan 29, 2026

CodSpeed Performance Report

Merging this PR will create unknown performance changes

Comparing trueberryless:feat/smartypants-config-options (131cd45) with main (d715f1f)1

Summary

���️ 9 archived benchmarks run2

Footnotes

  1. No successful run was found on main (1c6c9fc) during the generation of this report, so d715f1f was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

  2. 9 benchmarks were run, but are now archived. If they were deleted in another branch, consider rebasing to remove them from the report. Instead if they were added back, click here to restore them.

@Princesseuh
Copy link
Member

Awesome work! This is very nice. Unless something special happens, 5.17 was the last minor for the 5.x series of Astro. Would you be willing to rebase this PR onto the next branch? This would be released as part of Astro 6.

@Princesseuh Princesseuh modified the milestone: v6.0.0 Jan 29, 2026
@trueberryless trueberryless changed the base branch from main to next January 30, 2026 07:36
@trueberryless trueberryless force-pushed the feat/smartypants-config-options branch from 131cd45 to 4f302de Compare January 30, 2026 07:36
@trueberryless
Copy link
Contributor Author

trueberryless commented Jan 30, 2026

Awesome work! This is very nice. Unless something special happens, 5.17 was the last minor for the 5.x series of Astro. Would you be willing to rebase this PR onto the next branch? This would be released as part of Astro 6.

Thanks for letting me know, rebase is done!

EDIT: Just some type errors to fix for me so the tests pass again 👍

EDIT 2: Actually, I am really not sure how to fix this error. It seems like a mismatch with undefined.
Currently there is .default(ASTRO_CONFIG_DEFAULTS.markdown.smartypants) which should resolve to true, but it fails to build. However, when I hard-code true it would work. I am a little bit confused by this 🤔

Do you know how to fix this, Erika?

@github-actions
Copy link
Contributor

⚠️ Package Trust Level Decreased

Caution

Decreased trust levels may indicate a higher risk of supply chain attacks. Please review these changes carefully.

📦 Package 🔒 Before 🔓 After
eslint-plugin-regexp trusted-with-provenance none
@cloudflare/kv-asset-handler trusted-with-provenance none
@cloudflare/unenv-preset trusted-with-provenance none
workerd trusted-with-provenance none
@sveltejs/vite-plugin-svelte-inspector trusted-with-provenance provenance
@sveltejs/vite-plugin-svelte trusted-with-provenance provenance
jsdoc-type-pratt-parser trusted-with-provenance none
miniflare trusted-with-provenance none
youch provenance none
@cloudflare/workerd-darwin-64 trusted-with-provenance none
@cloudflare/workerd-darwin-arm64 trusted-with-provenance none
@cloudflare/workerd-linux-64 trusted-with-provenance none
@cloudflare/workerd-linux-arm64 trusted-with-provenance none
@cloudflare/workerd-windows-64 trusted-with-provenance none
wrangler trusted-with-provenance none
@matthewp matthewp deleted the branch withastro:next January 30, 2026 17:31
@matthewp matthewp closed this Jan 30, 2026
@matthewp matthewp reopened this Jan 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs pr feat: markdown Related to Markdown (scope) pkg: astro Related to the core `astro` package (scope)

3 participants