fasthtml
fasthtml copied to clipboard
[BUG] html2ft handling of white space
Describe the bug html2ft strips leading and trailing white space from text nodes, which might result in incorrect ft expressions.
Minimal Reproducible Example Enter this HTML at https://h2f.answer.ai/ :
Howdy <a href="https://answer.ai">answer</a> how are you?
Expected behavior You should get
'Howdy '
A('answer', href='https://answer.ai')
' how are you?'
but instead you get
'Howdy'
A('answer', href='https://answer.ai')
'how are you?'
Environment Information
- fastlite version: 0.1.1
- fastcore version: 1.7.28
- fasthtml version: 0.12.1
Confirmation
- [✅] I have read the FAQ (https://docs.fastht.ml/explains/faq.html)
- [✅] I have provided a minimal reproducible example
- [✅] I have included the versions of fastlite, fastcore, and fasthtml
- [✅] I understand that this is a volunteer open source project with no commercial support.
Screenshots