New feature: serverside syntax highlighting

Want to correct somebody’s code? So much easier now!


public class Main {
   public static void main(String[] args) {

-      System.out.println("Hello world!");
-      System.out.println("Wait, what?!");

+      System.out.println("Bye cruel world!");
   }
}

Would select all button doable at bottom of paste bin box?

I tried to select code from above example and every second time I messed it some how. Just test starting selectin from every corner one at time and you see funky behaviour.

I’m fighting the DOM in different browsers now. No luck as of yet.

In Firefox, you can ctrl-click on some part of the code and it’ll select the table cell that contains the code, which you can then ctrl-c to copy. The few times I do web apps, I often stick blocks in table cells for that reason alone.

After almost three years I finally got around fixing the bug in the syntax-highlighter that caused highlighted lines just after a line containing a single-line-comment to be broken.

Lo and behold:


@@  highlighted line
  code // comment
+ added line  <---- works!
  code /* comment */
- removed line
  code /** comment */

I also added ‘&’ as a delimiter:

abc&def+4&5L

Fixed short comment that was mistaken for a javadoc-comment (/**) that was ‘never’ closed:


ABC /**/ XYZ

Are there any more bugs to be fixed?

Looks pretty good!

Not a bug, but more a wish list item: auto-formatter, or at least indentation awareness/“fixer”.
Often the people who need help the most are the ones with the least readable code standards (or lack thereof).

After almost three years I finally got around fixing the bug in the syntax-highlighter that caused highlighted lines just after a line containing a single-line-comment to be broken.

Lo and behold:


@@  highlighted line
  code // comment
+ added line  <---- works!
  code /* comment */
- removed line
  code /** comment */

I also added ‘&’ as a delimiter:

abc&def+4&5L

Fixed short comment that was mistaken for a javadoc-comment (/**) that was ‘never’ closed:


ABC /**/ XYZ

Are there any more bugs to be fixed?

Looks pretty good!

Not a bug, but more a wish list item: auto-formatter, or at least indentation awareness/“fixer”.
Often the people who need help the most are the ones with the least readable code standards (or lack thereof).

I prefer Monaco on mac, Andale Mono on Ubuntu and Consolas on Windows.

So… this isn’t some ‘post your setup’ thread :clue:

I prefer Monaco on mac, Andale Mono on Ubuntu and Consolas on Windows.

So… this isn’t some ‘post your setup’ thread :clue:

What the heck that was so random :smiley:

What the heck that was so random :smiley: