Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(markdown/plugins/containers): use Token.attrJoin for rendering additional className #4128

Merged
merged 1 commit into from
Mar 8, 2025

Conversation

TheNorthMemory
Copy link
Contributor

Description

while there is an additional css className, for eg: .my-class onto the custom containers, vitepress is crashed with sth like:

11:19:56 PM [vitepress] Internal server error: Duplicate attribute.

The markdown content like below,

::: info {.my-class id=test}
hello
:::

Using the Token.attrJoin method is solved this problem, rendering as below:

<div class="my-class info custom-block" id="test">
  <p class="custom-block-title">INFO</p>
  <p>hello</p>
</div>

Linked Issues

Additional Context


Tip

The author of this PR can publish a preview release by commenting /publish below.

@TheNorthMemory
Copy link
Contributor Author

Hi there, a live usage scenario is here https://wechatpay.im/openapi/v3/merchant-service/complaints , the markdown content as below,

::: danger :no_entry_sign: {.im-deprecated}

本接口服务已于 `2020.11.27` (北京时间)下线,文档仅做留存参考。

:::

image

Hopes it shall be merged. @brc-dd

TheNorthMemory added a commit to wechatpay-im/easywechat that referenced this pull request Feb 18, 2025
this bug vuejs/vitepress#4128 was there a looooong time, it is blocked the vercel default deploy.
hence go back without the custom-css-notation
overtrue pushed a commit to w7corp/easywechat that referenced this pull request Feb 18, 2025
this bug vuejs/vitepress#4128 was there a looooong time, it is blocked the vercel default deploy.
hence go back without the custom-css-notation
@brc-dd brc-dd merged commit 8aad617 into vuejs:main Mar 8, 2025
8 checks passed
@TheNorthMemory TheNorthMemory deleted the fix/markdown-plugins-containers branch March 9, 2025 00:20
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 16, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants