Skip to content

Would like API to determine the language a file will be rendered as #374

Closed
@aroben

Description

@aroben

It would be nice to have an API like:

GitHub::Markup.language("README.md")
# => "markdown", or GitHub::Markup::Lanuage::MARKDOWN, or whatever

This would be useful for including in cache keys on github.com so we can make sure to re-render a file whenever its language changes. Right now we have to use the file's name instead as a proxy for this. But if something changes in GitHub::Markup's language-detection logic the cache won't get busted. Including the actual detected language in the cache key would fix this.

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