Extra space concatenated between text and expression
See original GitHub issueI’m using template literal in my class attribute class={`resizer resizer--${axe}`}
. It get preprocessed as class="resizer resizer-- {axe}"
(notice the space between --
and {axe}
).
I’ve dug into the code and found out these two lines. They introduce an extra space between the text and expression part of the attribute.
https://github.com/windicss/svelte-windicss-preprocess/blob/12c4040476569b839e60350bb5ab29d9e751127c/src/index.ts#L135 https://github.com/windicss/svelte-windicss-preprocess/blob/12c4040476569b839e60350bb5ab29d9e751127c/src/index.ts#L141
Am I missing something, a limitation of the preprocessor with template literal perhaps?
I’d be happy to create a PR to remove the space there.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
CONCATENATE function - Microsoft Support
Without designated spaces between separate text entries, the text entries will run together. Add extra spaces as part of the CONCATENATE formula. There...
Read more >How can a space be added with string concatenation?
Hello, one other way that you can add a space is by adding a space in between animal and '. For example: let...
Read more >Adjusting 1 space between two strings using python
Simply just add a space between the two strings: a = "abcd" b = "xyz" c = a + " " + b...
Read more >how to add extra space between two strings in a trigger?
Hey Sadik, You can concatenate a string with ' ' (1 space). You can add any number of spaces between two strings. String...
Read more >Concatenating string fields with one space between them - IBM
This means they cannot simply be concatenated since there may be more than one space between the two names. First, a RIGHT TRIM...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
pls try and submit pr, i will review (i am currently working on new tests… sorry for short answers)
Settled with
class="resizer {'resizer--'+axe}"