diff options
Diffstat (limited to 'src/libsyntax/parse/comments.rs')
| -rw-r--r-- | src/libsyntax/parse/comments.rs | 11 | 
1 files changed, 7 insertions, 4 deletions
| diff --git a/src/libsyntax/parse/comments.rs b/src/libsyntax/parse/comments.rs index b5072e8c2b5..01a4265ca4d 100644 --- a/src/libsyntax/parse/comments.rs +++ b/src/libsyntax/parse/comments.rs @@ -70,10 +70,10 @@ pub fn strip_doc_comment_decoration(comment: &str) -> ~str { /// remove whitespace-only lines from the start/end of lines fn vertical_trim(lines: ~[~str]) -> ~[~str] { let mut i = 0u, j = lines.len(); - while i < j && lines[i].trim().is_empty() { + while i < j && lines[i].trim_DBGBRWD().is_empty() { i += 1u; } - while j > i && lines[j - 1u].trim().is_empty() { + while j > i && lines[j - 1u].trim_DBGBRWD().is_empty() { j -= 1u; } return lines.slice(i, j).to_owned(); @@ -84,7 +84,7 @@ pub fn strip_doc_comment_decoration(comment: &str) -> ~str { let mut i = max.get_or_default(uint::max_value); for lines.each |line| { - if line.trim().is_empty() { + if line.trim_DBGBRWD().is_empty() { loop; } for line.each_chari |j, c| { @@ -109,7 +109,10 @@ pub fn strip_doc_comment_decoration(comment: &str) -> ~str { } if comment.starts_with(~"//") { - return comment.slice(3u, comment.len()).trim(); + // FIXME #5475: + // return comment.slice(3u, comment.len()).trim_DBGBRWD().to_owned(); + let r = comment.slice(3u, comment.len()); return r.trim_DBGBRWD().to_owned(); + } if comment.starts_with(~"/*") { | 
