We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c4697b6 commit dc0e7f5Copy full SHA for dc0e7f5
1 file changed
packages/vscode/src/commands/code-completion-commands.ts
@@ -451,7 +451,13 @@ async function perform_code_completion(params: {
451
/<replacement>([\s\S]*?)<\/replacement>/i
452
)
453
if (match && match[1]) {
454
- const decoded_completion = he.decode(match[1].trim())
+ let decoded_completion = he.decode(match[1].trim())
455
+ // Clean potential CDATA tags from the replacement
456
+ decoded_completion = decoded_completion
457
+ .replace(/<!\[CDATA\[/g, '')
458
+ .replace(/\]\]>/g, '')
459
+ .trim()
460
+
461
if (params.auto_accept) {
462
await editor.edit((editBuilder) => {
463
editBuilder.insert(position, decoded_completion)
0 commit comments