Skip to content

Support for <pre><code> basic pastebins #24

@jberger

Description

@jberger

A user told me that they have a home-rolled pastebin that they use that doesn't get embedded. While we can't expect to support every little bin, I think the situation as it exists could be somewhat improved.

The fallback in basic for generic pastetbins uses oddly-specific selectors, which I'm assuming conform to some specific paste sites. Notably the fact that it uses direct descendent selectors body > pre and body > div > pre is somewhat limiting. However in the specific case I'm looking at it wouldn't be insurmountable.

The site would work with a selector body > div > pre > code. That selector is again rather specific, it would be odd to require a div tag like that, it could be body pre > code to be a bit more accepting, though it would have to be attempted before body > div > pre or it would never get there. Alternatively it could optionally look for a code tag inside the resulting selector and walk into it if present. Or it could use all_text rather than text to get the tag contents. Are any of these suggestions acceptable?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions