2

I have a code and comments for RDoc like this:

# first line comment
# second line comment
def foo
end

When I output document by rdoc foo.rb, then line break are ignored in HTML file.

To add line break I can write like:

# first line comment<br>
# second line comment

or

# first line comment
#
# second line comment

but I feel both way are not simple enough.

Is there other simple way to add line break in RDoc?

ironsand
  • 14,329
  • 17
  • 83
  • 176

2 Answers2

2

Just add two or more spaces to the end of the line and it will work.

#first comment  
#second comment
def foo
end

The first line has 2 spaces after comment.

hahcho
  • 1,369
  • 9
  • 17
0

Add answer regarding add line break in common text: Make heading with full white space

 "===  " # <= the quoted part

At least this works on github.

benbai123
  • 1,423
  • 1
  • 11
  • 11