Helper: open a file in the backend and return its document links.
(
backend: &phpantom_lsp::Backend,
uri: &str,
content: &str,
)
| 4 | |
| 5 | /// Helper: open a file in the backend and return its document links. |
| 6 | fn get_document_links( |
| 7 | backend: &phpantom_lsp::Backend, |
| 8 | uri: &str, |
| 9 | content: &str, |
| 10 | ) -> Vec<DocumentLink> { |
| 11 | backend.update_ast(uri, content); |
| 12 | backend |
| 13 | .handle_document_link(uri, content) |
| 14 | .unwrap_or_default() |
| 15 | } |
| 16 | |
| 17 | /// Helper: extract just the target URLs (as strings) from document links. |
| 18 | fn link_targets(links: &[DocumentLink]) -> Vec<String> { |