Skip to content

Releases: COMP1010UNSW/pyhtml-enhanced

v2.2.4 - Fix for empty paragraphs

06 Apr 11:36
1171571
Compare
Choose a tag to compare

🔧 FIXED 🔧

  • Fix a crash when attempting to render a paragraph with a single empty string as a parameter.

v2.2.3 - Bug fix

03 Apr 09:04
429e40a
Compare
Choose a tag to compare

🔧 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

14 Feb 04:55
fdef82c
Compare
Choose a tag to compare

✏️ CHANGED ✏️

  • RenderOptions now supports indent=None, which means the given component will not be indented.
  • The WhitespaceSensitiveTag base class is now deprecated, as its behaviour can fully be replicated using RenderOptions(indent=None, spacing="")

🔧 FIXED 🔧

  • Fixed a bug where indentation was applied in DangerousRawHtml elements

v2.2.1 - Minor improvements

14 Feb 03:44
3c6121c
Compare
Choose a tag to compare

✨ NEW ✨

  • defer attribute is now suggested on script tags

✏️ CHANGED ✏️

  • Project classifiers have been improved

v2.2.0 - Render options support

12 Feb 11:29
4a0c6cd
Compare
Choose a tag to compare

✨ 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

03 May 07:26
Compare
Choose a tag to compare

✨ 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

15 Apr 11:35
Compare
Choose a tag to compare

🔧 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

13 Apr 06:38
Compare
Choose a tag to compare

🔧 FIXED 🔧

  • Passing a list[SomeElement] to a pyhtml element resulted in errors from Pylance.

v2.0.1 - Add escape hatch

03 Apr 02:28
Compare
Choose a tag to compare

✨ 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

10 Feb 07:30
Compare
Choose a tag to compare

✨ 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 all input(type='submit') elements where formaction is also specified (breaking change)