feat: strictly match module-level comments (#770)

* feat: strictly match module-level comments

* dev: update snapshot
This commit is contained in:
Myriad-Dreamin 2024-11-07 16:18:44 +08:00 committed by GitHub
parent 7dfa0fb498
commit c035f42676
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
109 changed files with 180 additions and 170 deletions

View file

@ -124,7 +124,7 @@ pub fn run_with_sources<T>(source: &str, f: impl FnOnce(&mut LspUniverse, PathBu
if source.starts_with("//") {
let first_line = source.lines().next().unwrap();
let content = first_line.strip_prefix("//").unwrap().trim();
let content = first_line.trim_start_matches("/").trim();
if let Some(path_attr) = content.strip_prefix("path:") {
source = source.strip_prefix(first_line).unwrap().trim();