Skip to content

Add webc syntax highlighting to GitHub by default #233

@caseywatts

Description

@caseywatts

Hello!

On a project I'm working on, I want syntax highlighting for .webc components on GitHub, and so I'm using the .gitattributes workaround to get GitHub highlight appropriately.

.gitattributes

*.webc linguist-language=HTML

This works well enough, but it's something we could make work by default!

If we wanted to add this, it looks like we could open a PR to the linguist repo to add .webc as a recognized-by-default extension. We could map .webc to HTML, like the .gitattributes workaround does now.
https://github.com/github-linguist/linguist/blob/main/CONTRIBUTING.md#adding-an-extension-to-a-language

Open questions

  • Can we prove that at least 200 unique :user/:repo repositories? That's one of their requirements (I think so!)
  • What are some good code examples of .webc? They ask for some real-world examples.
  • Do we have a "TextMate-compatible grammar" for webc already? If not, I wonder how hard that would be to make? That would help with highlighting in the situations where webc and html don't match perfectly (as opposed to just using HTML directly).
  • In the meantime, can/should we add the .gitattributes workaround to the documentation site? What would be a good page to add that to?

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