web-infra-dev / rspress

🦀💨 A fast Rspack-based static site generator.
https://rspress.dev
MIT License
1.19k stars 106 forks source link

[Feature]: Modify the logic of `flattenMdxContent` to support `replaceRules` #1073

Open shulaoda opened 1 month ago

shulaoda commented 1 month ago
          `FlattenMdxContent` can cause the unfolded MDX content to not apply `replaceRules`. To solve this problem, I think `replaceRules` should be applied to each MDX content flatten in the `flattenMdxContent`.

_Originally posted by @shulaoda in https://github.com/web-infra-dev/rspress/pull/1050#discussion_r1595332439_

SoonIter commented 1 month ago

There is another issue about flattenMdxContent, fully refactoring need to be done to solve these issues together.

https://github.com/web-infra-dev/rspress/issues/1071