Releases: COMP1010UNSW/pyhtml-enhanced
Releases · COMP1010UNSW/pyhtml-enhanced
v2.2.4 - Fix for empty paragraphs
🔧 FIXED 🔧
- Fix a crash when attempting to render a paragraph with a single empty string as a parameter.
v2.2.3 - Bug fix
🔧 FIXED 🔧
- Fix an issue where manual indentation was not respected within tags such as
<p>
#112 - This probably also fixes many other indentation-related issues
v2.2.2 - Bug fixes
✏️ CHANGED ✏️
RenderOptions
now supportsindent=None
, which means the given component will not be indented.- The
WhitespaceSensitiveTag
base class is now deprecated, as its behaviour can fully be replicated usingRenderOptions(indent=None, spacing="")
🔧 FIXED 🔧
- Fixed a bug where indentation was applied in
DangerousRawHtml
elements
v2.2.1 - Minor improvements
✨ NEW ✨
defer
attribute is now suggested onscript
tags
✏️ CHANGED ✏️
- Project classifiers have been improved
v2.2.0 - Render options support
✨ NEW ✨
- Add
p.RenderOptions
for fine-grained control over how tags are rendered <p>
elements now have no spacing between child elements by default. ❗Breaking change❗- Added
fencedframe
tag
✏️ CHANGES ✏️
pyhtml-enhanced
now requires at least Python 3.10. ❗Breaking change❗<portal>
element has been removed (see mdn/content#37880 for details). Not a breaking change, since it was never implemented in browsers.
⚙️ TECHNICAL CHANGES ⚙️
- Now using
ruff
for linting. - Migrated
pyproject.toml
to Poetry v2 format.
v2.1.0 - Improvements and features
✨ NEW ✨
- Default attributes have been added for many elements including
pre
,div
,textarea
,span
, and more elements - Add support for whitespace-sensitive tags
✏️ CHANGED ✏️
- Document rendering control methods
- Refactor rendering to add indentation during rendering, rather than at end
🔧 FIXED 🔧
- Fix rendering of
<pre>
and<textarea>
tags - Include a
<!DOCTYPE html>
to prevent web browsers from rendering in quirks mode
v2.0.3 - Fix `<style>` tags and link rendering
🔧 FIXED 🔧
<style>
tags no-longer escape their contents, meaning including inline CSS is far more reliable.- Fixed link rendering for HTML tag xrefs, so documentation should no-longer look broken in VS Code
v2.0.2 - Type safety fixes
🔧 FIXED 🔧
- Passing a
list[SomeElement]
to apyhtml
element resulted in errors from Pylance.
v2.0.1 - Add escape hatch
✨ NEW ✨
DangerousRawHtml
tag class to use as an escape hatch from PyHTML's string escapes
🔧 FIXED 🔧
- Contents of
<script>
tags were escaped, causing syntax errors in inline JS Code
v2.0 - Typing improvements and usability enhancements
✨ NEW ✨
- PyHTML now accepts generators as children to elements
- Type constraints have been added to arguments for tags, preventing common mistakes (breaking change)
- The
input
tag has been modified to make editor suggestions more intelligent
✏️ CHANGES ✏️
- The
formmethod
attribute is specified for allinput(type='submit')
elements whereformaction
is also specified (breaking change)