Make rustdoc.js use license comments.
This commit is contained in:
@@ -1,12 +1,14 @@
|
|||||||
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
|
/*!
|
||||||
// file at the top-level directory of this distribution and at
|
* Copyright 2014 The Rust Project Developers. See the COPYRIGHT
|
||||||
// http://rust-lang.org/COPYRIGHT.
|
* file at the top-level directory of this distribution and at
|
||||||
//
|
* http://rust-lang.org/COPYRIGHT.
|
||||||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
*
|
||||||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
* Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
* http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||||
// option. This file may not be copied, modified, or distributed
|
* <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||||
// except according to those terms.
|
* option. This file may not be copied, modified, or distributed
|
||||||
|
* except according to those terms.
|
||||||
|
*/
|
||||||
|
|
||||||
/*jslint browser: true, es5: true */
|
/*jslint browser: true, es5: true */
|
||||||
/*globals $: true, rootPath: true */
|
/*globals $: true, rootPath: true */
|
||||||
|
|||||||
@@ -169,8 +169,10 @@ fn licenseck(file: &Path, contents: &str) -> bool {
|
|||||||
lines.windows(LICENSE.lines().count()).any(|window| {
|
lines.windows(LICENSE.lines().count()).any(|window| {
|
||||||
let offset = if window.iter().all(|w| w.starts_with("//")) {
|
let offset = if window.iter().all(|w| w.starts_with("//")) {
|
||||||
2
|
2
|
||||||
} else if window.iter().all(|w| w.starts_with("#")) {
|
} else if window.iter().all(|w| w.starts_with('#')) {
|
||||||
1
|
1
|
||||||
|
} else if window.iter().all(|w| w.starts_with(" *")) {
|
||||||
|
2
|
||||||
} else {
|
} else {
|
||||||
return false
|
return false
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user