runemadsen / Magic-Book-Project

DEPRECATED: We are reviving the Magic Book project as a node package: https://github.com/magicbookproject/magicbook
http://itp.nyu.edu
621 stars 59 forks source link

Offset long lines of code instead of wrapping #134

Closed stevenklise closed 12 years ago

stevenklise commented 12 years ago

when a comment is present.

                                         This is the comment
this is the code;
shiffman commented 12 years ago

Looking through the text, it looks like to me that it would sometimes be best to have it above and sometimes below. So I might want to specify it. But not a big deal either way. . I can also see how it would be easier to just have it do this automatically.

stevenklise commented 12 years ago

Usage:

//[offset-up] Here is a comment going up
PVector locationAfterSomethingHappened = new PVector(4.0, 8.9, 1.1);
//[offset-down] Here is a comment going down
PVector locationAfterSomethingHappened = new PVector(4.0, 8.9, 1.1);
int x = 0;
int y = 0;

Currently [offset-down] doesn't work in the HTML when it is the last line of a code block. Not sure why.

stevenklise commented 12 years ago

This is working better now. Addressed with commit 62a5903. I'm going to close this issue but leave issue #144 open.