GithubHelp home page GithubHelp logo

Comments (5)

zhengchun avatar zhengchun commented on May 20, 2024

htmlquery package will auto remove duplicated text since #20 .

from htmlquery.

WithoutPants avatar WithoutPants commented on May 20, 2024

htmlquery package will auto remove duplicated text since #20 .

Except that it doesn't consistently.

Take the source string <sup>24</sup><sup>24</sup><sup>24</sup>

Perform a QueryAll using //sup/text().

Expected output would be:

24
24
24

Actual output is the same - it works as intended.

Now perform QueryAll using //sup/text()|/div/text(). The only difference here is the extra option. The expected output should be the same.

Actual output for this one is:

24

So at the very least there is inconsistency between the behaviour of the two queries, and my expectation would be that it is the second case that is performing incorrectly.

from htmlquery.

zhengchun avatar zhengchun commented on May 20, 2024

This is a bug, I had fixed at antchfx/xpath@a015dcb
Thanks for your feedback.

from htmlquery.

WithoutPants avatar WithoutPants commented on May 20, 2024

Thank you. I can confirm that this has fixed the issue.

from htmlquery.

WithoutPants avatar WithoutPants commented on May 20, 2024

When are we likely to see a new release with this fix?

from htmlquery.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.