When you paste some text e.g. "This is for the test", it is changed to "This Is For the test"
It uppercased the I from Is and the F from for. I suspect it has something to do with them being keywords.
This is especially hurtful when you want to paste some javascript in a $""$ structure. It is not something you notice immidiately, but it can be a long search to find out why the script does not run.
Weird thing is it doesn't happen all the time. Maybe just when the IDE is in a 'check the code cycle'?
If it's only a single line paste, the adding a ' to make it a comment will work, you can change it as you want afterwards. Yes, the IDE is parsing the pasted text.
I haven't tried it, but I suspect that if you paste it into the middle of $""$ it will be OK too.
If it happens inside a string literal then it is a bug. I wasn't able to reproduce it (when the code was valid, which means that the string was declared inside a sub).
anyway I take this opportunity to fix a small problem with the string literals:
With this code:
B4X:
Private Sub GetMapHtml(Address As String) As String
Dim Key As String = "123456789"
Dim su As StringUtils
Dim s As String
s = $"<!DOCTYPE html>
<head>
<style Type='text/css'>
html, body
{
padding:0px;
margin:0px;
width: 100%;
height: 100%;
overflow-x:hidden;
overflow-y:hidden;
}
</style>
</head>
<body>
<div>
<iframe
width="100%"
height="100%"
style="padding:0px; border: 0; overflow: hidden; height: 100%; width: 100%; position: absolute;"
src="https://www.google.com/maps/embed/v1/place?q=${su.EncodeUrl(Address.Replace(" ", "+"), "UTF8")}&key=${Key}"
allowfullscreen></iframe>
</div>
</body>
</html>
"$
End Sub