Hey there folks,
I am using some javascript thing to make my text move like a slot machine, however if the ejs variable has a space, it shows as a y not a space. See via posting twaffle.glitch.me (use the form on the home page) and possibly needing to refresh a few times. Inspect element to see what I mean and the CDN file I am using. I am doing on a phone on holiday so I am not used to debugging on it, so hope someone can help. I have tried everything I can think of.
Some background: on the backend, it picks two random values from two arrays and adds them into one variable. I pass this through via ejs and then put it in the Javascript to make the scrolling text. If I display normally, it shows the space, but if with the scrolling text, it shows a ‘y’
What’s weird is that the original text that isn’t an ejs variable also has a space but doesn’t show a y
Yes, I see a Y! That is really weird. And cool effect.
You could use JavaScript and possibly RegExp to find ‘y’s and replace them with a blank character like
but if the text originally contains a’ y’, that could also get replaced.
Or you could try rendering a string with
<%- text with a space %>
This would preserve whitespace and hence, correctly rendering your string.
As I have said, I have tried everything and this doesn’t fix it thanks for trying to help though.
Somebody else had the same issue so I have emailed the creator of the plugin ‘odoo’ https://gist.github.com/CodeMyUI/6645049922a196f37a5dd0b1d35b7a5a#gistcomment-2613811
Mike got back to me within minutes of sending the mail which is really nice considering it’s 7pm right now in Poland (I do a lot of research when contacting people to see how long it will take for me to get a reply, including their time zone and their recent activity)
He said this:
So it’s a known bug and not a fault in the code.