Coder Social home page Coder Social logo

Comments (2)

everton-rosario avatar everton-rosario commented on April 25, 2024

Instant Article markup doesn't apply any rendering to

tags.
Any text should be within the allowed tags that can be checked here: https://developers.facebook.com/docs/instant-articles/reference

The expected result on your case would be:

First div text

First paragraph text

A nested div

Plus a nested paragraph

To transform your

tags into paragraph, you will need to add a transformation rule into your rules.json.

The rule will be something like:

    {
        "class": "ParagraphRule",
        "selector": "div"
    }

from facebook-instant-articles-sdk-php.

esolitos avatar esolitos commented on April 25, 2024

The rule you have suggested is actually defined, however the nested content is just dropped, isn't this wrong?

At the moment the only way i was able to make it work is to add a passthrough rule to anything below a div, however i'm not sure it's the right approach:

{
    'class': 'PassThroughRule',
    'selector': "//div[*]"
}

from facebook-instant-articles-sdk-php.

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.