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?

2 Answers 2

3

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.

Sign up to request clarification or add additional context in comments.

Comments

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.