Fixed hyphen in filename breaking LSP
This commit is contained in:
parent
4645257e62
commit
9296516f5a
|
@ -79,7 +79,7 @@ pub fn uri_to_module_name(uri: &url::Url, root: &Path) -> Option<String> {
|
||||||
.ok()?
|
.ok()?
|
||||||
.components()
|
.components()
|
||||||
.skip(1)
|
.skip(1)
|
||||||
.map(|c| c.as_os_str().to_string_lossy());
|
.map(|c| c.as_os_str().to_string_lossy().replace("-", "_"));
|
||||||
|
|
||||||
let module_name = Itertools::intersperse(components, "/".into())
|
let module_name = Itertools::intersperse(components, "/".into())
|
||||||
.collect::<String>()
|
.collect::<String>()
|
||||||
|
|
Loading…
Reference in New Issue