Skip to content

Moves Python code out of interpreter file #207

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 18 commits into from
May 6, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge branch 'main' into fpliger/154_move_py_code_out
  • Loading branch information
fpliger committed May 5, 2022
commit b39b2d5510f03847594e48938f2b2783c1d43fcf
16 changes: 8 additions & 8 deletions pyscriptjs/src/pyscript.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ def identity(value, meta):


MIME_RENDERERS = {
'text/plain': identity,
'text/html' : identity,
'image/png' : lambda value, meta: render_image('image/png', value, meta),
'image/jpeg': lambda value, meta: render_image('image/jpeg', value, meta),
'image/svg+xml': identity,
'application/json': identity,
'application/javascript': lambda value, meta: f'<script>{value}</script>'
"text/plain": identity,
"text/html": identity,
"image/png": lambda value, meta: render_image("image/png", value, meta),
"image/jpeg": lambda value, meta: render_image("image/jpeg", value, meta),
"image/svg+xml": identity,
"application/json": identity,
"application/javascript": lambda value, meta: f"<script>{value}</script>",
}
Copy link
Contributor

Choose a reason for hiding this comment

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

It won't let me comment below but line 48 indentation is slightly off. Please fix before merging now that it's actually being used.



Expand Down Expand Up @@ -188,7 +188,7 @@ def clone(self, new_id=None, to=None):
to.element.appendChild(clone)

# Inject it into the DOM
self.element.after(clone);
self.element.after(clone)

return Element(clone.id, clone)

Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.