2014-07-27 51 views
1

我有一个代码和注释RDoc这样的:如何添加换行符中的RDoc

# first line comment 
# second line comment 
def foo 
end 

rdoc foo.rb我输出文档,然后换行符在HTML文件中忽略。

要添加换行符我可以写这样的:

# first line comment<br> 
# second line comment 

# first line comment 
# 
# second line comment 

但我觉得这两种方式都不简单。

是否有其他简单的方法在RDoc中添加换行符?

回答

1

只需在该行的末尾添加两个或多个空格即可使用。

#first comment 
#second comment 
def foo 
end 

第一行在comment之后有2个空格。

关于常见的文本添加换行符
0

加答案: 使您以饱满的空白

 "===  " # <= the quoted part 

标题至少这个工程在GitHub上。