Skip to content

Fix dedenting of <py-script> code #130

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

Merged
merged 1 commit into from
May 3, 2022
Merged

Fix dedenting of <py-script> code #130

merged 1 commit into from
May 3, 2022

Conversation

philippjfr
Copy link
Contributor

@philippjfr philippjfr commented May 2, 2022

Runs ltrim before HTML decoding the string. The HTML decode strips the indentation of the first line and thereby caused ltrim to be a no-op.

Fixes #104

@philippjfr philippjfr requested a review from fpliger May 2, 2022 23:02
@philippjfr philippjfr added the status: ready PR that is ready for review label May 2, 2022
Copy link
Contributor

@fpliger fpliger left a comment

Choose a reason for hiding this comment

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

YES PLEASE!!

@fpliger fpliger merged commit d8cb5f2 into main May 3, 2022
@fpliger fpliger deleted the dedent_code branch May 3, 2022 16:42
@cclauss cclauss mentioned this pull request May 6, 2022
cclauss added a commit to cclauss/pyscript that referenced this pull request May 6, 2022
pyscript#130 makes Python fit right into the existing HTML indentation just like JavaScript.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: ready PR that is ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Indentation error for multi-line <py-script> blocks
2 participants