Skip to content

Commit

Permalink
Rename hr->Hr add alias HorizontalRule, add changelog entry (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasborgen authored Apr 17, 2024
1 parent 522ad85 commit 61bdbd4
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@

* Using single quotes for attributes lets us support `hx-vals`, since it expects a doubled quoted json string.


### Fix

* Rename `hr`->`Hr`, add alias `HorizontalRule` and export both in `__init__.py`

## Version 1.0.0 Hypermedia released

Hypermedia is an opinionated way to work with HTML in python and FastAPI. Hypermedia is designed to work with htmx.
Expand Down
6 changes: 4 additions & 2 deletions hypermedia/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@
Header4,
Header5,
Header6,
HorizontalRule,
Hr,
Html,
P,
Paragraph,
Title,
hr,
)
from hypermedia.formatting import (
Abbr,
Expand Down Expand Up @@ -200,7 +201,8 @@
"Paragraph",
"Br",
"Break",
"hr",
"Hr",
"HorizontalRule",
"Comment",
# formatting
"Abbr",
Expand Down
8 changes: 6 additions & 2 deletions hypermedia/basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,15 +114,19 @@ class Br(VoidElement):


class Break(Br):
"""Alias for br tag.."""
"""Alias for br tag."""


class hr(VoidElement):
class Hr(VoidElement):
"""Defines a thematic change in the content."""

tag: str = "hr"


class HorizontalRule(Hr):
"""Alias for hr tag."""


class Comment(BaseElement):
"""Defines a comment."""

Expand Down

0 comments on commit 61bdbd4

Please sign in to comment.