vuejs / vuepress

📝 Minimalistic Vue-powered static site generator
https://vuepress.vuejs.org
MIT License
22.58k stars 4.76k forks source link

Code Component have overflow classname for language support #3152

Closed spencerHT closed 1 year ago

spencerHT commented 1 year ago

Bug report

Steps to reproduce

  1. git clone git@github.com:spencerHT/vp-test.git
  2. yarn && yarn dev
  3. visit http://localhost:8080/guide/using-vue.html
  4. find overflowed classname image

What is expected?

Have no much classname

What is actually happening?

rawCode below with language and other word with "

```ts title="test"
for ts

At packages/@vuepress/markdown/lib/preWrapper.js, token.info.trim() in this case is ts title="test", html resolve finally failed.

<div class="language-ts  title="test" extra-class">

Other relevant information