Skip to content

Code Component have overflow classname for language support #3152

Closed
@spencerHT

Description

@spencerHT
  • I confirm that this is an issue rather than a question.

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

  • Output of npx vuepress info in my VuePress project:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions