test logs
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user