Giter Site home page Giter Site logo

Support for Img tags about htmlfastparse HOT 4 CLOSED

rizwan95 avatar rizwan95 commented on August 16, 2024
Support for Img tags

from htmlfastparse.

Comments (4)

rizwan95 avatar rizwan95 commented on August 16, 2024 1

Yes I will give it a try for sure!

from htmlfastparse.

ezhes avatar ezhes commented on August 16, 2024

Hi,

HTMLFastParse doesn't support images at the moment. I'm also not sure what the expected behavior would be since attributed strings must have the image embedded directly in them and so to correctly parse your example we'd need to hit the network which IMO is well out of scope of a parser.

from htmlfastparse.

rizwan95 avatar rizwan95 commented on August 16, 2024

Hi @ezhes ,

Yes, img src tags require a network call. I was wondering how Cocoamarkdown was able to do it. It would be really great if we could do it in this parser!

from htmlfastparse.

ezhes avatar ezhes commented on August 16, 2024

I didn't know cocoamarkdown did it, that's pretty cool!

Unfortunately I don't think I'll be adding this for the time being since this library is heavily focused on parsing the HTML returned by Reddit rather than being a super flexible general purpose renderer. Since Reddit doesn't have img tags in their responses, HTMLFastParse chooses to ignore them for simplicity.

If you do end up adding this yourself (which, afaik, would be a very difficult project given you'd need to write a lot of code to handle network and image layout), I would absolutely consider any pull request you submit!

from htmlfastparse.

Related Issues (6)

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.