remove trailing slashes

This commit is contained in:
Simon Knott 2025-02-27 14:28:47 +01:00
parent b30b2f7229
commit c8e56ac293
No known key found for this signature in database
GPG key ID: 8CEDC00028084AEC

View file

@ -62,7 +62,7 @@ function useCodeFrame(stack: StackFrame[] | undefined, sources: Map<string, mode
return '';
const targetLine = selectedFrame?.line ?? 0;
const lines = source.content.split('\n');
const start = Math.max(0, targetLine - width);
const end = Math.min(lines.length, targetLine + width);