-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
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
Vue SRR renders newline characters into class attributes #7859
Labels
Comments
haoqunjiang
added a commit
to haoqunjiang/vue
that referenced
this issue
Apr 16, 2018
I'm experiencing this issue as well. Using Tailwind CSS in Vue SFCs, it is helpful to break the class names onto multiple lines to avoid long single lines. The \n character is breaking the class names. Hopefully this makes it into the next release. |
brophdawg11
added a commit
to brophdawg11/vue
that referenced
this issue
May 4, 2018
When encountering newlines in SSR classnames, do not render "\n"" and instead replace the new line with a space. Once newlines are removed, indentation from subsequent lines can leave classnames abnormally spaced out, so replace multiple spaces with a single space fix vuejs#7859
13 tasks
Finally got some time to dig into this and opened a PR: #8130 |
13 tasks
brophdawg11
added a commit
to brophdawg11/vue
that referenced
this issue
Jun 30, 2018
yyx990803
pushed a commit
that referenced
this issue
Aug 20, 2018
f2009
pushed a commit
to f2009/vue
that referenced
this issue
Jan 25, 2019
aJean
pushed a commit
to aJean/vue
that referenced
this issue
Aug 19, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version
2.5.16
Reproduction link
Gist
Steps to reproduce
index.js
filenpm install --save vue vue-server-renderer
node index.js
What is expected?
Once rendered in the browser, all 6
long-classname-*
class styles should be applied to the second element.What is actually happening?
Because the class attribute is rendered with
long-classname-3\n
, the styles forlong-classname-3
are not appliedThis can be worked around by adding a space before the mid-attribute line break, however this doesn't play nicely with the ESLint
no-trailing-spaces
rule and the settings for many common editors.The text was updated successfully, but these errors were encountered: