test logs

This commit is contained in:
Hailey
2024-04-23 19:45:05 -07:00
parent 0788d8aafa
commit f45f8faee0
2 changed files with 14 additions and 0 deletions
@@ -15,6 +15,10 @@ export function addLinkCardIfNecessary({
prevAddedLinks: Set<string>
byteEnd: number
}) {
console.log({
byteIndex: byteEnd,
})
const utf16Index = utf8IndexToUtf16Index(newText, byteEnd)
// Because we always trim the whitespace at the end of the text
newText = newText + ' '
@@ -28,6 +32,11 @@ export function addLinkCardIfNecessary({
toAdd = 1
}
console.log({
utf8Index: byteEnd,
utf16Index: utf16Index,
})
if (!mayBePaste && utf16Index + toAdd !== cursorLocation) {
return
}