Skip to content

Commit

Permalink
Merge pull request #101 from thchr/patch-1
Browse files Browse the repository at this point in the history
Remove redundant space insertion in `text` (fix #100)
  • Loading branch information
JamesWrigley authored Jan 2, 2025
2 parents 86f3b75 + c94c9cd commit 78f07cb
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "Gumbo"
uuid = "708ec375-b3d6-5a57-a7ce-8257bf98657a"
version = "0.8.2"
version = "0.8.3"

[deps]
AbstractTrees = "1520ce14-60c1-5f80-bbc7-55ef81b5835c"
Expand Down
2 changes: 1 addition & 1 deletion src/manipulation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ function text(el::HTMLElement)
io = IOBuffer()
for c in AbstractTrees.PreOrderDFS(el)
if c isa HTMLText
print(io, c.text, ' ')
print(io, c.text)
end
end

Expand Down
7 changes: 7 additions & 0 deletions test/manipulation.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@testset "`text`" begin
doc = parsehtml("<em>foo</em>bar<em></em>baz")
@test text(doc.root) == "foobarbaz"

doc = parsehtml("<math><mrow><msub><mrow><mi>MoSe</mi></mrow><mrow><mn>2</mn></mrow></msub></mrow></math>")
@test text(doc.root) == "MoSe2"
end
1 change: 1 addition & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ include("comparison.jl")
include("parsing.jl")
include("traversal.jl")
include("io.jl")
include("manipulation.jl")

5 comments on commit 78f07cb

@JamesWrigley
Copy link
Contributor 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.

Error while trying to register: Register Failed
@JamesWrigley, it looks like you are not a publicly listed member/owner in the parent organization (JuliaWeb).
If you are a member/owner, you will need to change your membership to public. See GitHub Help

@JamesWrigley
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@aviks I think you might need to be the one to register the new version (though I am a public member of the org so I'm not sure why the bot is complaining).

@aviks
Copy link
Member

@aviks aviks commented on 78f07cb Jan 2, 2025 via email

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/122310

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

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.8.3 -m "<description of version>" 78f07cb32ecafbabbdf5e785cba399a0c2dd9f35
git push origin v0.8.3

Please sign in to comment.