Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion kson-lib/src/commonMain/kotlin/org/kson/Kson.kt
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ private fun convertTokens(internalTokens: List<InternalToken>): List<Token> {
contentStart = contentToken.lexeme.location.start
}
contentEnd = contentToken.lexeme.location.end
contentBuilder.append(contentToken.value)
contentBuilder.append(contentToken.lexeme.text)
}

// Add the open quote token
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ class KsonValuePathBuilder(private val document: String, private val location: C
targetNode is KsonObject &&
forDefinition -> {
// Extract the property name from the token
val propertyName = lastToken.value
val propertyName = lastToken.lexeme.text
path + propertyName
}
// Location is outside the token - target the parent element (for completions)
Expand Down Expand Up @@ -245,4 +245,4 @@ class KsonValuePathBuilder(private val document: String, private val location: C
}


}
}
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ class SchemaInfoDisplayTest {
"""

// Get hover info for the name field (line 2, pointing to "John")
val hoverInfo = KsonTooling.getSchemaInfoAtLocation(document, schema, 2, 14)
val hoverInfo = KsonTooling.getSchemaInfoAtLocation(document, schema, 2, 15)
assertNotNull(hoverInfo)
assertTrue(hoverInfo.contains("User's full name"))
assertTrue(hoverInfo.contains("*Type:* `string`"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ class SchemaInfoLocationTest {
""".trimIndent()

val hoverInfo = getInfoAtCaret(schema, """
email: <caret>'user@example.com'
email: '<caret>user@example.com'
""".trimIndent())

assertNotNull(hoverInfo, "Expected hover info but got null")
Expand Down Expand Up @@ -473,4 +473,4 @@ class SchemaInfoLocationTest {
assertTrue(hoverInfo.contains("Item name from ref"), "Expected description from resolved ref. Got: $hoverInfo")
assertTrue(hoverInfo.contains("*Type:* `string`"), "Expected type from resolved ref. Got: $hoverInfo")
}
}
}
Loading