Skip to content

code_highlight() supports long strings and symbols#727

Merged
gaborcsardi merged 5 commits intor-lib:mainfrom
moodymudskipper:fix/long-strings-and-symbols
Apr 22, 2025
Merged

code_highlight() supports long strings and symbols#727
gaborcsardi merged 5 commits intor-lib:mainfrom
moodymudskipper:fix/long-strings-and-symbols

Conversation

@moodymudskipper
Copy link
Copy Markdown
Contributor

Closes #726

I used a better approach than what I used at the time for prettycode. This is less hacky and solves corner cases that I hadn't looked into back then.

It first looked like utils::getParseText() could solve the issue but unfortunately it doesn't parse long symbols (used also for names) so this is not enough. Hence I created get_parse_data() wrapping getParseDate() and borrowing elements from utils::getParseText().

@moodymudskipper
Copy link
Copy Markdown
Contributor Author

@gaborcsardi Is there anything I can do to help moving this forward?

@gaborcsardi gaborcsardi merged commit 59e3586 into r-lib:main Apr 22, 2025
14 checks passed
@gaborcsardi
Copy link
Copy Markdown
Member

Thanks!

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.

code_highlight() trims long strings

2 participants