You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
I've actually been thinking about this lately and wondering if this would make sense to push the render selection into linguist. There's not currently a huge need for it, but PRs like #343 and #252 made me think that this could be a linguist concern.
It'd be a shame to bust github.com's caches just because you decided to refactor your code. (Alternatively, it would be a shame to have to treat your class names as API, since you couldn't change them.) I think something more explicit would be better.
It would be nice to have an API like:
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.
The text was updated successfully, but these errors were encountered: