Login [Register]
Don't have an account? Register now to chat, post, use our tools, and much more.
Here is my problem, special for KermM:


Code:

Disp "test"
If A>B
Disp "TEST"


Here is my code directly from SC, before posting. As you can see, without a space at the end of the line.


But here an image after posting:


When I copy that code back to SC, I must remove all the spaces at the end of the lines.
Cannot replicate. Edit: Firefox 37.0.2 on Windows 7.

Yeah:

Something different Very Happy
Can replicate. Chrome 42 on Windows 8.
Happens to me on Win7 with Chrome 43 and IE9, but not Firefox.
Can replicate Chrome 42 Windows 7
Looks like it's a Webkit issue, I can replicate it in Safari but not in Firefox on the same computer (OS X 10.10.3).

Replicated:
Safari - 8.0.6 (10600.6.3)
Chome - 45.0.2412.0 canary (64-bit)

Unreplicated:
Firefox - 34.0.5
I have this problem too, and same as you, it's pretty annoying...

Can Replicate:
Chrome 41.0.2272.118
Well, because I heard it more times, I had created a special website that removes the spaces for you. Instead of removing each space, which costs much time, simply copy your code in the textbox and click on the button; now you can copy it to SourceCoder or whatever.

The site is http://removespaces.herobo.com/.

I have tested it, and it works properly. Have fun with it!
Do the spaces happen every time someone sends a program file to SourceCoder 3? It has happened to me only once.
It's not an issue at all, really. It's just in the way certain browsers handle text. I assume in this case it's how webkit (e.g. Chrome, Safari) handles monospace font.
IE11 appears to demonstrate the same behavior. I suspect what's at fault is how phpbb handles newlines.

Here I have the space following "test" in the OP and preceding the line break highlighted in the DOM browser. You can see the same thing easily in the original page source.


hexdump shows there's a full CR/LF in which I assume not-Firefox browsers are treating the CR as visible whitespace.
Code:
00004490  3b 22 3e 0d 0a 3c 62 72  20 2f 3e 0a 44 69 73 70  |;">..<br />.Disp|
000044a0  20 26 71 75 6f 74 3b 74  65 73 74 26 71 75 6f 74  | &quot;test&quot|
000044b0  3b 0d 0a 3c 62 72 20 2f  3e 0a 49 66 20 41 26 67  |;..<br />.If A&g|
I suspect you're right. I did some basic testing with other sites and the phpBB site doesn't have this issue (though it's phpBB3). I can actually replicate this with non-monospace font; Making my previous post mostly irrelevant.
PT_ wrote:
Well, because I heard it more times, I had created a special website that removes the spaces for you. Instead of removing each space, which costs much time, simply copy your code in the textbox and click on the button; now you can copy it to SourceCoder or whatever.

The site is http://removespaces.herobo.com/.

I have tested it, and it works properly. Have fun with it!
This doesn't load the website for me. It takes me to some website ad...
It's because the website doesn't exist anymore Sad Maybe PT_ still has the code so it can be rehosted elsewhere.
No, but I've created very fast a new script that does exactly the same. You can find it at https://removespaces.000webhostapp.com/ . Just copy the code in the textbox, and click on "Submit". The code-without-spaces will be shown at screen, you can very simply copy that to SourceCoder or something else Smile
PT_ wrote:
No, but I've created very fast a new script that does exactly the same. You can find it at https://removespaces.000webhostapp.com/ . Just copy the code in the textbox, and click on "Submit". The code-without-spaces will be shown at screen, you can very simply copy that to SourceCoder or something else Smile


If you'd like to host that at a more permanent location, I can throw it up on my website.
Alex wrote:
If you'd like to host that at a more permanent location, I can throw it up on my website.

If you want to, the code is rather simple:

Code:
<html><head>
<title>Remove spaces</title>
</head><body>
<pre>
<?php
   if (!empty($_POST['submit']) && !empty($_POST['remove_spaces'])) {
      $array = explode("\r\n", $_POST['remove_spaces']);
      for ($a = 0; $a < count($array); $a++) {
         $array[$a] = substr($array[$a], 0, -1);
      }
      echo implode("\n", $array);
   } else {
?>

<form method="post">
   <textarea rows="30" cols="50" id="remove_spaces" name="remove_spaces"></textarea>
    <input id="submit" name="submit" type="submit" />
</form>
<?php } ?>
</pre>
</body>
</html>

(I don't like writing CSS and stuff Razz)
Or... you know... someone could just fix Cemetech so we don't have to use an external tool just to copy code.


EDIT: So after doing some simple investigation that anyone could do, newlines in code boxes on Cemetech are formatted like this:

Code:
<span class="pln"> <br></span>

Can't you just... remove that space? That's clearly the issue.
Runer112 wrote:
Or... you know... someone could just fix Cemetech so we don't have to use an external tool just to copy code.

That's just crazy talk. It's been a known issue for quite some time, obviously it is not high priority.

Quote:
[2016-03-30 14:08:07] <saxjax> [MateoConLechuga] Code boxes don't do tabs at all Sad
[2016-03-30 14:08:26] <saxjax> [MateoConLechuga] And they add a space to the end of every line
[2016-03-30 14:08:34] <saxjax> [Cemetech] GTemples27 added a post in [GTemples' C++ Things]( http://cemete.ch/p247499 )
[2016-03-30 14:10:20] <saxjax> [Cemetech] GTemples27 edited a post in [GTemples' C++ Things]( http://cemete.ch/p247499 )
[2016-03-30 14:11:05] <KermPhD> Sure they do tabs!
[2016-03-30 14:11:11] <KermPhD> Only Chrome adds that a extra space. Neutral
[2016-03-30 14:11:25] <saxjax> [MateoConLechuga] Chrome is stupid
[2016-03-30 14:11:28] <KermPhD> ^
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 2
» All times are GMT - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement