Fix #! (shebang) stripping account space issue #70528
This commit is contained in:
parent
dbf8b6bf11
commit
0315864260
@ -236,7 +236,7 @@ pub enum Base {
|
||||
/// (e.g. "#![deny(missing_docs)]").
|
||||
pub fn strip_shebang(input: &str) -> Option<usize> {
|
||||
debug_assert!(!input.is_empty());
|
||||
if !input.starts_with("#!") || input.starts_with("#![") {
|
||||
if !input.starts_with("#!") || input.starts_with("#![") || input.starts_with("#! [") {
|
||||
return None;
|
||||
}
|
||||
Some(input.find('\n').unwrap_or(input.len()))
|
||||
|
Loading…
Reference in New Issue
Block a user