Skip to content

Support transclusions #72

@zverok

Description

@zverok
page = Infoboxer.wp.get('List_of_The_Simpsons_episodes_(seasons_1–20)')
page.sections('Episodes').sections.first.templates
# => [#<Template[main article](1: "The Simpsons (season 1)")>, #<Template[](1: "The Simpsons (season 1)")>]

The last one is understood as nameless template, with first vairable eq to "The Simpsons (season 1)". In fact, if you look in the page code, you'll see {{:The Simpsons (season 1)}}, which is "transclude page named The Simpsons (season 1)", and should be represented somewhat like #<TranscludedTemplate[The Simpsons (season 1)]>

And, in any case, nameless templates is not a thing and should fail early if found.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions