Code Monkey home page Code Monkey logo

Comments (3)

robcthegeek avatar robcthegeek commented on May 26, 2024

I think this error is coming up from CsQuery here - and it makes sense, you've asked the selector to handle something it can't handle (irrespective of it's validity).

However, I don't think we should fall on our ass because of that, I was thinking of the following:

  • We search the CSS for any unsupported selectors.
  • We strip them out.
  • We leave a HTML comment in the document to let the user know this has happened? (I personally hate the silent actions that just leave you clueless as to what's happened)
  • Carry on processing everything else as normal.

I'll put together a pull request shortly.

from premailer.net.

martinnormark avatar martinnormark commented on May 26, 2024

I agree, never fail except for situations where an ArgumentException is suitable.

The comments in the HTML is fine for now, but I'd like to move to a concept of a more detailed result object that could look like this:

{
    Output: "premailed output",
    Warnings: [],
    Errors: []
}

The same goes for the parameters when calling the premailer method, as more information such as base URL is needed to fix #8 and #5.

Along with the option to remove style blocks, ignore selectors, base URL etc. it might be more clean to have a class for this.

from premailer.net.

robcthegeek avatar robcthegeek commented on May 26, 2024

Hey @martinnormark - sounds good on the return type for MoveCssInline. I've created #27 so it's on our radar. This will be no problem to add.

from premailer.net.

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.