Skip to content

BUG:Tags with side effect (<script> and <style>) are ignored in client component templates. #5015

@CWT113

Description

@CWT113

Describe the bug

In VitePress, I installed [email protected], and then set the math property to true in vite.config.ts.

In my Markdown file, I wrote the following math formulas:

$(i + j) / 2$

$$ x = {-b \pm \sqrt{b^2-4ac} \over 2a} $$

At this point, VitePress reported an error with the following details:
Image

Reproduction

  1. pnpm add -D vitepress
  2. pnpm vitepress init
  3. pnpm add -D markdown-it-mathjax3
  4. set the math property to true in vite.config.ts
  5. In Markdown file, wrote the following math formulas:
$(i + j) / 2$

$$ x = {-b \pm \sqrt{b^2-4ac} \over 2a} $$

Expected behavior

I expect the math formulas to be displayed correctly.

Image

System Info

none

Additional context

No response

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions