fix: resolve relative path in subfolders (#1574)

This commit is contained in:
Myriad-Dreamin 2025-03-26 11:10:51 +08:00 committed by GitHub
parent 9790153381
commit d4fffe3543
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
25 changed files with 92 additions and 88 deletions

View file

@ -167,11 +167,9 @@ impl ReferencesWorker<'_> {
#[cfg(test)]
mod tests {
use tinymist_std::path::unix_slash;
use super::*;
use crate::syntax::find_module_level_docs;
use crate::{tests::*, url_to_path};
use crate::tests::*;
#[test]
fn test() {
@ -191,8 +189,7 @@ mod tests {
let mut result = result.map(|v| {
v.into_iter()
.map(|loc| {
let fp = unix_slash(&url_to_path(loc.uri));
let fp = fp.strip_prefix("C:").unwrap_or(&fp);
let fp = file_path(loc.uri.as_str());
format!(
"{fp}@{}:{}:{}:{}",
loc.range.start.line,