Skip to content

fix(run.lua): replace backslashes in command to prevent escape issues in insert_commented()#510

Merged
jalvesaq merged 1 commit intomainfrom
fix/inserted-commented
Mar 2, 2026
Merged

fix(run.lua): replace backslashes in command to prevent escape issues in insert_commented()#510
jalvesaq merged 1 commit intomainfrom
fix/inserted-commented

Conversation

@PMassicotte
Copy link
Collaborator

@PMassicotte PMassicotte commented Mar 2, 2026

There was some bad escaping in the last commit (659dc18).

Use this:

:lua require('r.run').insert_commented()

On this:

# Bad
gsub("\\d+", "X", "abc123def456")
# [1] "abc123def456"

With these changes:

# Good
gsub("\\d+", "X", "abc123def456")
# [1] "abcXdefX"

@PMassicotte PMassicotte marked this pull request as ready for review March 2, 2026 19:06
@jalvesaq
Copy link
Member

jalvesaq commented Mar 2, 2026

Thank you!

@jalvesaq jalvesaq merged commit 6004610 into main Mar 2, 2026
9 checks passed
@jalvesaq jalvesaq deleted the fix/inserted-commented branch March 2, 2026 19:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants