Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] Stop trimming code on change in embedded editor #4872

Merged
merged 3 commits into from
Dec 8, 2023

Conversation

jpelay
Copy link
Member

@jpelay jpelay commented Dec 7, 2023

Description

Changes the call to the function get_active_and_trimmed_code in the change listener of the editor to a new function called getEditorContents. The first actually changes the editor contents, trimming the code on every change.

Fixes #4852

How to test

And check that you can add spaces to the end of a line

@jpelay jpelay requested a review from TiBiBa December 7, 2023 23:27
@Felienne
Copy link
Member

Felienne commented Dec 8, 2023

Hi @jpelay!

Will this also stop trimming spaces from the front of the line? Because I actually like that behaviour!

@jpelay
Copy link
Member Author

jpelay commented Dec 8, 2023

Hi @jpelay!

Will this also stop trimming spaces from the front of the line? Because I actually like that behaviour!

Hi, @Felienne!

It will still trim the spaces normally when you hit run. Before, it was trimming the spaces every time the user edited the contents of the editor, causing the issue.

Copy link
Collaborator

@TiBiBa TiBiBa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thanks!

Copy link
Contributor

mergify bot commented Dec 8, 2023

Thank you for contributing! Your pull request is now going on the merge train (choo choo! Do not click update from main anymore, and be sure to allow changes to be pushed to your fork).

@mergify mergify bot merged commit 66cbf1a into hedyorg:main Dec 8, 2023
9 checks passed
Copy link
Contributor

mergify bot commented Dec 8, 2023

Thank you for contributing! Your pull request is now going on the merge train (choo choo! Do not click update from main anymore, and be sure to allow changes to be pushed to your fork).

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.

[BUG] Whitespace is broken on the embedded editor
3 participants