Giter Site home page Giter Site logo

Comments (2)

subimage avatar subimage commented on September 3, 2024

I believe it should work with existing HTML markup, or markdown — which is
why I made the changes and submitted the patches I did. If you're working
on anything like a CMS or blog software that's the only way to go. User
input in the wild is unpredictable stuff.

On Wed, Aug 13, 2014 at 6:39 PM, zrisher [email protected] wrote:

Hi all,

I notice that there are a lot of areas where this would break existing
HTML markup (i.e. any link where the src= one of the supported urls). I see
related pull requests @subimage https://github.com/subimage #116
#116, #114
#114 that would fix this in
certain situations. But if this is really meant to work with anyone's
existing markup, and you need URL filters to only target text, some
architectural changes (possibly involving parsing content into nodes via
Nokogiri and then only running filters on text) would be easier and more
DRY than adding the conditions onto every regex. That's a big change in
functionality.

The content of README.md seems to indicate that this is meant to be used
as either a complete filter on very simple content fields (without much
previous markup, which gets escaped), or as a simple filter called
individually when you know you need it (once you've isolated exactly the
text that needs changing).

I love the respository - it works very well for my project when used in
the latter way. But if it's meant to work on all prexisting markup it needs
some changes. If not, perhaps this could be indicated in the readme so
similar issues and pull requests aren't raised.

@dejan https://github.com/dejan, could you let us know if you see this
repository eventually fully supporting pre-existing markup? Or should we
plan on calling filters on isolated sections in those cases?


Reply to this email directly or view it on GitHub
#122.

seth @ subimage llc
http://subimage.com

from auto_html.

zrisher avatar zrisher commented on September 3, 2024

With the changes made today, this repo no longer meets any of my use cases for it (i.e. the various social links in Rails). So I won't be using it, and if I'm the only one who had issues with running this over existing HTML markup, this issue can be closed.

from auto_html.

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.