Skip to content

Add remark-plugin-autonbsp to list of plugins#1476

Merged
wooorm merged 2 commits intoremarkjs:mainfrom
denisinvader:remark-plugin-autonbsp
Feb 5, 2026
Merged

Add remark-plugin-autonbsp to list of plugins#1476
wooorm merged 2 commits intoremarkjs:mainfrom
denisinvader:remark-plugin-autonbsp

Conversation

@denisinvader
Copy link
Contributor

@denisinvader denisinvader commented Feb 1, 2026

Initial checklist

  • I read the support docs
  • I read the contributing guide
  • I agree to follow the code of conduct
  • I searched issues and discussions and couldn’t find anything or linked relevant results below
  • I made sure the docs are up to date
  • I included tests (or that’s not needed)

Description of changes

Add remark-plugin-autonbsp to the list of plugins

@github-actions github-actions bot added the 👋 phase/new Post is being triaged automatically label Feb 1, 2026
@github-actions

This comment has been minimized.

@github-actions github-actions bot added 🤞 phase/open Post is being triaged manually and removed 👋 phase/new Post is being triaged automatically labels Feb 1, 2026
Copy link
Member

@remcohaszing remcohaszing left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool project!

A few tips:

  • You can build the project with tsc. You don’t need Vite.
  • If you do really want to use Vite for some reason: Vitest understands vite.config.ts, so you can remove vitest.config.ts.
  • The types field describes how to resolve types for the main field. You didn’t specify the main field. You should specify it if you want to support it. If you do specify the main field, you no longer need the types field.
  • For my personal projects I no longer support the main field. I find it more valuable teaching people to use the correct module settings the TS config.
  • You can simplify this:
      "exports": {
        ".": "./dist/index.js"
      }
    into:
      "exports": "./dist/index.js"
  • The prepublishOnly script runs before packing, but only if publishing directly. I recommend using prepack, which always happens before packing.
  • Perhaps this would be better as a rehype plugin instead of a remark plugin.

@denisinvader
Copy link
Contributor Author

@remcohaszing thank you for your review, I appreciate this. I've copied build and tests config from my another project as a boilerplate and noticed that it's overkill later. I'll fix it soon.

Perhaps this would be better as a rehype plugin instead of a remark plugin.

Can you explain why?

Here's my thinking: I type   or ⌥ + Space in my source files -> I want to automate this -> I need to automatically replace whitespace in source files. So in a transform pipeline these changes should be applied closer to source (as if it would done by hand).

If I understand correctly, rehype is about transforming MD to HTML. With remark plugin it's possible to enhance user input while still storing markdown (may be not the best server solution but still possible)

@remcohaszing
Copy link
Member

remark plugins are about transforming markdown. remark-rehype transforms markdown to HTML. rehype plugins are about transforming HTML.

Typically users want to transform the HTML output, not the source files. They often reach for remark plugins, because remark is more known than rehype. In that case a rehype plugin is actually more appropriate.

If your goal is to modify markdown files, then you are correct, a remark plugin is the correct choice.

@codecov
Copy link

codecov bot commented Feb 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (f1f9321) to head (9a19d30).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #1476   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            6         6           
  Lines          138       138           
=========================================
  Hits           138       138           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@wooorm wooorm changed the title add remark-plugin-autonbsp to the list of plugins add remark-plugin-autonbsp to list of plugins Feb 5, 2026
@wooorm wooorm changed the title add remark-plugin-autonbsp to list of plugins Add remark-plugin-autonbsp to list of plugins Feb 5, 2026
@wooorm wooorm merged commit b8f5045 into remarkjs:main Feb 5, 2026
8 of 12 checks passed
@wooorm
Copy link
Member

wooorm commented Feb 5, 2026

Thanks! :)

@github-actions
Copy link

github-actions bot commented Feb 5, 2026

Hi! This was closed. Team: If this was merged, please describe when this is likely to be released. Otherwise, please add one of the no/* labels.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🤞 phase/open Post is being triaged manually

Development

Successfully merging this pull request may close these issues.

3 participants