Jump to content


Check out our Community Blogs

Register and join over 40,000 other developers!


Recent Status Updates

View All Updates

Photo
- - - - -

Code formatting after editing is weird


This topic has been archived. This means that you cannot reply to this topic.
6 replies to this topic

#1 Chall

Chall

    CC Addict

  • Senior Member
  • PipPipPipPipPip
  • 349 posts

Posted 04 November 2012 - 02:21 PM

Well, basically, whenever I post code using code tags, and then go back to the post later, and edit it, whenever I save the changes, it messes up the format of the code. I don't know if this is for everyone, but I do know it happens frequently with me, and I was wondering if anything can be done about it.
Thanks,
~Chall

Example [Before edit]:
package environment;
public class BasicObject implements Locatable {

private int x, y, z;

public BasicObject(int x, int y, int z){
  this.x = x;
  this.y = y;
  this.z = z;
}
@Override
public int getX() {
  return x;
}
@Override
public int getY() {
  return y;
}
@Override
public int getZ() {
  return z;
}
}


Example [After edit]:
package environment;
public class BasicObject implements Locatable {

private int x, y, z;

public BasicObject(int x, int y, int z){
this.x = x;
this.y = y;
this.z = z;
}
@Override
public int getX() {
return x;
}
@Override
public int getY() {
return y;
}
@Override
public int getZ() {
return z;
}
}

Speaks fluent Java

#2 wim DC

wim DC

    Roar

  • Expert Member
  • PipPipPipPipPipPipPipPip
  • 2681 posts

Posted 05 November 2012 - 01:32 AM

http://forum.codecal...editing-a-post/

Cannot change, must wait for IPB.

#3 Chall

Chall

    CC Addict

  • Senior Member
  • PipPipPipPipPip
  • 349 posts

Posted 05 November 2012 - 04:54 AM

http://forum.codecal...editing-a-post/

Cannot change, must wait for IPB.

Ah, okay, thanks. :)
Speaks fluent Java

#4 Roger

Roger

    Skadoosh!

  • Administrator
  • 1222 posts

Posted 09 November 2012 - 08:20 AM

Looks like IPBoard is going to fix this type of problem by their 3.4 release. I really like the code display, since most other sites display line numbers for code blocks! :)

http://community.inv...r-improvements/

Code Boxes
The code box has been improved to allow you to select the code format (HTML, Javascript, PHP, etc) and a starting line number. Tabs and spaces are also preserved correctly.
Posted Image

Live Previews
When adding quote and code boxes, the editor will preview them live, like so:
Posted Image

The code box when rendered fully contains striping and line numbers which makes it easier to read the code:
Posted Image


We're confident that by rewriting the editor and parsing engines, the editor in IP.Board 3.4 will be much more stable and reduce those annoyances which can sometimes crop up when writing complex posts.


New around here? Click here to register and start participating in under a minute?

Or do a quick search and you may find the answer you're looking for.


#5 BenW

BenW

    CC Devotee

  • Community Manager
  • 976 posts

Posted 09 November 2012 - 11:35 AM

That looks like a big improvement! :)

fss_overall.png

 


#6 dargueta

dargueta

    I chown trolls.

  • Moderator
  • 4854 posts

Posted 25 November 2012 - 03:10 PM

Finally, jeez. :) I take it this is gonna fix the issue where sometimes editing a post would put the font and highlighting tags in it?

sudo rm -rf / && echo $'Sanitize your inputs!'


#7 Roger

Roger

    Skadoosh!

  • Administrator
  • 1222 posts

Posted 25 November 2012 - 05:01 PM

We'll see when it's released. They should fix other known issues.

New around here? Click here to register and start participating in under a minute?

Or do a quick search and you may find the answer you're looking for.





Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download