mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 05:49:08 +00:00
Treat two hash marks followed by text as a doc comment
This commit is contained in:
parent
4dca0546f4
commit
723c390f52
3 changed files with 3 additions and 15 deletions
|
@ -847,15 +847,6 @@ impl<'a> CommentOrNewline<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn to_string_repr(&self) -> std::string::String {
|
||||
use CommentOrNewline::*;
|
||||
match self {
|
||||
Newline => "\n".to_owned(),
|
||||
LineComment(comment_str) => format!("#{comment_str}"),
|
||||
DocComment(comment_str) => format!("##{comment_str}"),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn comment_str(&'a self) -> Option<&'a str> {
|
||||
match self {
|
||||
CommentOrNewline::LineComment(s) => Some(*s),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue