We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents b517745 + 46268a7 commit 58621faCopy full SHA for 58621fa
src/db/add_package.rs
@@ -260,8 +260,10 @@ fn read_rust_doc(file_path: &Path) -> Result<Option<String>> {
260
for line in reader.lines() {
261
let line = try!(line);
262
if line.starts_with("//!") {
263
- if line.len() > 3 {
264
- rustdoc.push_str(line.split_at(4).1);
+ // some lines may or may not have a space between the `//!` and the start of the text
+ let line = line.trim_start_matches("//!").trim_start();
265
+ if !line.is_empty() {
266
+ rustdoc.push_str(line);
267
}
268
rustdoc.push('\n');
269
0 commit comments