This project has moved and is read-only. For the latest updates, please go here.

Code Block component -- doubling blank lines

Topics: User Forum
Jun 3, 2012 at 4:11 AM

A small but annoying thing:

We're using the Code Block component to include VB examples in our docs.

Suppose I have two lines of code where:
(1) the first line ends with an in-line comment
(2) the second line is blank

In the code display, I get two blank lines, instead of one.

There is a workaround -- we just put a ' character on the second line, far out to the right, in "column" 100 or so. This works, but it doesn't feel right, and we often forget to do it. I'm guessing that this would be easy to fix. Anybody know how ?

Jun 3, 2012 at 3:30 PM

Which presentation style are you using?

Jun 4, 2012 at 4:00 AM

We're using the Prototype style.

I didn't realize that this would be style-dependent. I'll check the other styles.

I'd love to use your new VS2010-ish style, if I could bend it to my will.

One reason we use Prototype is because we (somewhat) understand it and know how to modify it. I can't understand even the .CSS file for the VS2010 style (see my other question). Thanks.

Jun 4, 2012 at 6:54 PM

If it's a problem with the colorizer, I'd expect to see the same issue in all presentation styles.  If I understand you correctly, the following should duplicate the issue:

Some code here    ' End of line comment

More code here




Jun 5, 2012 at 2:11 AM

Eric -- correct. You'll get two blank lines between "Some code here" and "More code here".

I'm pretty sure we checked and found that this happens with the VS2010 style, too.
I will confirm today.

Jun 5, 2012 at 2:57 AM

Checked -- it happens in Prototype, VS2005, and VS2010.