vuepress / core

Vue-Powered Static Site Generator
https://vuepress.vuejs.org
MIT License
2.33k stars 923 forks source link

[Bug report] Invalid value used as weak map key #222

Closed gtn1024 closed 3 years ago

gtn1024 commented 3 years ago

Bug report

Description

When I use <center></center> in docs/README.md, it gets wrong.

Steps to reproduce

Expected behavior

Screenshots

image

Environment info

➜  vuepress-next-bug git:(main) ✗ npx vuepress info

  System:
    OS: macOS 11.4
    CPU: (8) arm64 Apple M1
    Memory: 107.02 MB / 16.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 14.17.0 - ~/.nvm/versions/node/v14.17.0/bin/node
    Yarn: 1.22.10 - /opt/homebrew/bin/yarn
    npm: 6.14.13 - ~/.nvm/versions/node/v14.17.0/bin/npm
  Utilities:
    Git: 2.30.1 - /usr/bin/git
  Browsers:
    Chrome: 91.0.4472.106
    Edge: 91.0.864.53
    Firefox: 89.0.1
    Safari: 14.1.1
  npmPackages:
    @vuepress/bundler-vite: Not Found
    @vuepress/bundler-webpack:  2.0.0-beta.18 
    @vuepress/cli:  2.0.0-beta.18 
    @vuepress/client:  2.0.0-beta.18 
    @vuepress/core:  2.0.0-beta.18 
    @vuepress/markdown:  2.0.0-beta.18 
    @vuepress/plugin-active-header-links:  2.0.0-beta.18 
    @vuepress/plugin-back-to-top:  2.0.0-beta.18 
    @vuepress/plugin-container:  2.0.0-beta.18 
    @vuepress/plugin-debug: Not Found
    @vuepress/plugin-docsearch: Not Found
    @vuepress/plugin-git:  2.0.0-beta.18 
    @vuepress/plugin-google-analytics: Not Found
    @vuepress/plugin-medium-zoom:  2.0.0-beta.18 
    @vuepress/plugin-nprogress:  2.0.0-beta.18 
    @vuepress/plugin-palette:  2.0.0-beta.18 
    @vuepress/plugin-prismjs:  2.0.0-beta.18 
    @vuepress/plugin-pwa: Not Found
    @vuepress/plugin-pwa-popup: Not Found
    @vuepress/plugin-register-components: Not Found
    @vuepress/plugin-search: Not Found
    @vuepress/plugin-shiki: Not Found
    @vuepress/plugin-theme-data:  2.0.0-beta.18 
    @vuepress/plugin-toc: Not Found
    @vuepress/shared:  2.0.0-beta.18 
    @vuepress/theme-default:  2.0.0-beta.18 
    @vuepress/theme-vue: Not Found
    @vuepress/utils:  2.0.0-beta.18 
    vue:  3.1.1 
    vue-loader:  16.2.0 
    vue-router:  4.0.9 
    vuepress: ^2.0.0-beta.18 => 2.0.0-beta.18 
    vuepress-vite: Not Found
meteorlxy commented 3 years ago

Duplicate of #201, #186.

In short, avoid using deprecated html tags, or set compilerOptions.isCustomElement

yzx9 commented 3 years ago

I think it's duplicated of #186, #201

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/center

gtn1024 commented 3 years ago

@meteorlxy I think it should be written to the VuePress Document to highlight this feature as many people may ignore it.

meteorlxy commented 3 years ago

Sure. We'll update the docs later