-
-
Notifications
You must be signed in to change notification settings - Fork 30
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
inline_fragment not worked for python #388
Comments
Thanks for the report! I haven't anticipated this use case as css_inline.inline(template, extra_css="""
body {
font-family: Arial, sans-serif;
}
table, th, td {
border: 1px solid black;
border-collapse: collapse;
}
""")
# <html><head></head>
# <body style="font-family: Arial, sans-serif;">
# <table style="border: 1px solid black;border-collapse: collapse;">
#
# <tbody><tr>
# <th style="border: 1px solid black;border-collapse: collapse;">Test</th>
# <td style="border: 1px solid black;border-collapse: collapse;">text</td>
# </tr>
# </tbody>
# </table>
#
#
# </body></html> In any event, I think the behavior of |
it's just that I use inline_fragment after rendering the jinja2 template and not always the template is html and I then don't have to wrap in tags like BeautifulSoup does |
Makes sense! Then, I'd add some fallback for non-fragments to avoid whitespace-only output |
I did, it's just the blank line is really confusing. thanks for the reply! |
You are very welcome! To clarify, I meant that I am going to implement it directly in |
Great, thank you! |
Hi, when passing valid html to a function, an empty string is returned
Python 3.8.18
MacOS Sequoia 15.0
The text was updated successfully, but these errors were encountered: