-
Notifications
You must be signed in to change notification settings - Fork 919
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
[Bug report] Rendering issues with <wbr> tags #602
Comments
This reproduces identically with the $ npx vuepress-vite info
System:
OS: Linux 5.10 Debian GNU/Linux 11 (bullseye) 11 (bullseye)
CPU: (4) x64 Intel(R) Core(TM) i5-4200M CPU @ 2.50GHz
Memory: 1.50 GB / 7.53 GB
Shell: 5.1.4 - /bin/bash
Binaries:
Node: 17.3.0 - ~/.nvm/versions/node/v17.3.0/bin/node
Yarn: 1.22.10 - /usr/local/bin/yarn
npm: 8.3.0 - ~/.nvm/versions/node/v17.3.0/bin/npm
Utilities:
Git: 2.30.2 - /usr/bin/git
Browsers:
Chrome: 96.0.4664.110
Firefox: 91.4.1esr
npmPackages:
@vuepress/bundler-vite: 2.0.0-beta.32
@vuepress/bundler-webpack: Not Found
@vuepress/cli: 2.0.0-beta.32
@vuepress/client: 2.0.0-beta.32
@vuepress/core: 2.0.0-beta.32
@vuepress/markdown: 2.0.0-beta.32
@vuepress/plugin-active-header-links: 2.0.0-beta.32
@vuepress/plugin-back-to-top: 2.0.0-beta.32
@vuepress/plugin-container: 2.0.0-beta.32
@vuepress/plugin-debug: Not Found
@vuepress/plugin-docsearch: Not Found
@vuepress/plugin-external-link-icon: 2.0.0-beta.32
@vuepress/plugin-git: 2.0.0-beta.32
@vuepress/plugin-google-analytics: Not Found
@vuepress/plugin-medium-zoom: 2.0.0-beta.32
@vuepress/plugin-nprogress: 2.0.0-beta.32
@vuepress/plugin-palette: 2.0.0-beta.32
@vuepress/plugin-prismjs: 2.0.0-beta.32
@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.32
@vuepress/plugin-toc: Not Found
@vuepress/shared: 2.0.0-beta.32
@vuepress/theme-default: 2.0.0-beta.32
@vuepress/utils: 2.0.0-beta.32
vue: 3.2.26
vue-loader: Not Found
vue-router: 4.0.12
vuepress: Not Found
vuepress-vite: ^2.0.0-beta.32 => 2.0.0-beta.32
vuepress-webpack: Not Found |
This issue is marked as |
Bump |
Does wbr a standard tag? If not, config Vue option |
Yes, it's a standard tag. It's listed here: https://www.w3schools.com/TAGS/default.ASP Also confer https://developer.mozilla.org/en-US/docs/Web/HTML/Element/wbr Either way, I'll try your suggestion, thank you! |
This issue is marked as |
bump |
Updated. It must be related with the lines above, probably needs meteorlxy check what he is doing here. This plugins seems to be built as a workaround to prevent some special contents being resolved by vite. But i am not full understand what it did here. I think you can use bundler-webpack as a workaround. |
@meteorlxy are there any updates on this? Are you planning on working on this? |
It does have a every low prority, meteorlxy is trying to add esm support, then we will probably split repo into meteorlxy is busy in the past few days as he changed his job from 1 company to another. He is getting back to the project these days. |
This issue is probably related with a vite workaround, so you should be able to bypass it using webpack as bundler. |
You mean, use webpack instead of vite? |
Yes, though I did not test, it should work well with wepack. And if you do have workaround, it's fine for we to leave this issue after we reach out other goals. |
Thanks! We will try this. |
As far as I can tell, this code is unrelated to the problem. The respective part of the plugin is related to https://vitejs.dev/guide/env-and-mode.html#production-replacement. Also, I am able to reproduce the problem with the |
Emmm, is webpack working fine? This bug may come from vue and vite, and may not be releated to vuepress. But only the above code in vuepress is related with If you ensure that the above code is not related with this issue, then probably it's not a vuepress bug. |
I can try webpack simply by using mkdir repro
cd repro
npm init -y
npm i -D vuepress@2.0.0-beta.38
echo 'A <wbr> `0` <wbr> B <wbr> `1` C `2` <wbr> D <wbr> [E](./)' > README.md
npx vuepress build
I am like 92 % sure, it's not my project so there might be some odd behaviour that I am not aware of. However, I think the above code is not running in the browser, and I have confirmed that it has no effect during rendering. What's more, the docs say it's about env vars, and my reproduction does not use any of those, so it should not apply. So I'd be very surprised if that was the offending plugin. If it's not a vuepress bug, then what is it? I assume that vuepress uses the SSR feature of Vue, should I open an issue there? |
What I basically did was to do a |
This is affecting more and more places in our site. Is there any workaround for this? The respective parts are not interactive. For example, can we partially disable the hydration for certain DOM nodes? I also don't mind investigating this, but I simply have no clue where to start. If you could give me a few 30,000ft-view guesses about which code is affected, I could move on from there. |
I'll look into it tomorrow |
Reported here: vuejs/core#6008 |
Thanks. I had played around with vuepress enough to have a feeling that it's in the Vue core lib, but I would've never figured it out. I'll close this in favour of vuejs/core#6008. |
Bug report
Description
It seems like inserting
<wbr>
tags somehow duplicates the text in a paragraph. Originally asked in #551, I was able to reproduce the issue without any plugins in a fresh project with a single README file containing a single line of text.Steps to reproduce
Run the following shell script.
Serve the
.vuepress/dist
folder and open it in your browser.Expected behavior
The page displays:
Actual behavior
The page displays:
Interestingly, the page:
npx vuepress-vite dev
Screenshots
Serving the assets built by

npx vuepress-vite build
:Serving via

npx vuepress-vite dev
:Environment info
vuepress info
:The text was updated successfully, but these errors were encountered: