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

Updated html2xt to use unpacked dicts when attr keys are not valid python names #57

Merged
merged 1 commit into from
Jul 19, 2024

Conversation

matdmiller
Copy link
Contributor

Updated html2xt to use unpacked dicts when attr keys are not valid python names.

Also added example of using an unpacked dict to the explaining components nb.

Minimal Example:

hl_md(html2xt_new('<div x-data="{open: false}" x-init="console.log(\'Initialized\')" @click="open = !open">Toggle</div>'))

to

Div('Toggle', x_data='{open: false}', x_init="console.log('Initialized')", **{'@click':'open = !open'})

@matdmiller
Copy link
Contributor Author

@jph00 just mentioning you to put this on your list in gh when you get a chance to look at it.

@jph00 jph00 merged commit 39f9f71 into AnswerDotAI:main Jul 19, 2024
@jph00 jph00 added the enhancement New feature or request label Jul 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants