Skip to content

Commit

Permalink
v0.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
algunion committed Jun 26, 2023
1 parent e29112a commit 440c6c3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/comparison.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@

import Base: ==, isequal, hash

isequal(x::NullNode, y::NullNode) = true

isequal(x::HTMLDocument, y::HTMLDocument) =
isequal(x.doctype,y.doctype) && isequal(x.root,y.root)

Expand Down Expand Up @@ -45,3 +47,4 @@ function hash(elem::HTMLElement{T}) where {T}
end

hash(t::HTMLText) = hash(hash(HTMLText),hash(t.text))
hash(n::NullNode) = hash(NullNode)
4 changes: 2 additions & 2 deletions src/manipulation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ Base.getindex(elem::HTMLElement,i) = getindex(elem.children,i)
Set the `i`th child of an element.
"""
function Base.setindex!(elem::HTMLElement,i,val)
if !val.parent == elem
if val.parent != elem
val.parent = elem
end
setindex!(elem.children,i,val)
Expand All @@ -90,7 +90,7 @@ end
Push a child onto an element.
"""
function Base.push!(elem::HTMLElement,val)
if !val.parent == elem
if val.parent != elem
val.parent = elem
end
push!(elem.children, val)
Expand Down

2 comments on commit 440c6c3

@algunion
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/86245

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.2.0 -m "<description of version>" 440c6c3c3d4342daa8e3082cc789a4236a9999d6
git push origin v0.2.0

Please sign in to comment.