Skip to content
This repository has been archived by the owner on Aug 31, 2023. It is now read-only.

Commit

Permalink
chore: do not show the URL in case it's broken
Browse files Browse the repository at this point in the history
  • Loading branch information
ematipico committed Dec 23, 2022
1 parent a54b919 commit c0c43f7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions crates/rome_lsp/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,9 @@ pub(crate) fn diagnostic_to_lsp<D: Diagnostic>(
let code_description = diagnostic
.category()
.and_then(|category| category.link())
.map(|link| CodeDescription {
href: Url::parse(link).unwrap(),
.and_then(|link| {
let href = Url::parse(link).ok()?;
Some(CodeDescription { href })
});

let message = PrintDescription(&diagnostic).to_string();
Expand Down

0 comments on commit c0c43f7

Please sign in to comment.