mirror of https://github.com/astral-sh/ruff
Use concise message to show diagnostics in playground (#17357)
## Summary This PR fixes the playground to use the new `concise_diagnostic` method. ## Test plan **Before:** <img width="1728" alt="Screenshot 2025-04-11 at 11 37 34 AM" src="https://github.com/user-attachments/assets/cbfcbc52-2e70-4277-9363-ba197711390e" /> **After:** <img width="1728" alt="Screenshot 2025-04-11 at 11 38 03 AM" src="https://github.com/user-attachments/assets/356ec63c-50d9-49a8-8df4-84000b46fb6d" />
This commit is contained in:
parent
da32a83c9f
commit
e5026c0877
|
|
@ -322,7 +322,7 @@ impl Diagnostic {
|
||||||
|
|
||||||
#[wasm_bindgen]
|
#[wasm_bindgen]
|
||||||
pub fn message(&self) -> JsString {
|
pub fn message(&self) -> JsString {
|
||||||
JsString::from(self.inner.primary_message())
|
JsString::from(self.inner.concise_message().to_string())
|
||||||
}
|
}
|
||||||
|
|
||||||
#[wasm_bindgen]
|
#[wasm_bindgen]
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue