You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
functiontest(code){constresult=twoslasher(code)console.log("input code",JSON.stringify(code))console.log("output code",JSON.stringify(result.code))console.log("hover",result.hovers[0])}test("const a = 1\n// ---cut---\nconst b = 2")test("const a = 1\r\n// ---cut---\r\nconst b = 2")
input code "const a = 1\n// ---cut---\nconst b = 2"
output code "const b = 2"
hover { line: 0, ... }
input code "const a = 1\r\n// ---cut---\r\nconst b = 2"
output code "\nconst b = 2"
hover { line: 1, ...}
I think the result should be the same for both cases. If you agree I can send a PR with a test and a fix.
The text was updated successfully, but these errors were encountered:
Repro: https://stackblitz.com/~/edit/stackblitz-starters-9jr2ud
These two strings return different results:
I think the
result
should be the same for both cases. If you agree I can send a PR with a test and a fix.The text was updated successfully, but these errors were encountered: