wooorm / refractor

Lightweight, robust, elegant virtual syntax highlighting using Prism
MIT License
724 stars 34 forks source link

Add sh as bash alias #19

Closed Kikobeats closed 5 years ago

Kikobeats commented 5 years ago

Hello,

I added sh as bash alias since it's widely used (e.g. GitHub highlighter use it)

wooorm commented 5 years ago

Hey there! 👋

The change here objectively makes sense, however, we match Prism in its support. More importantly, the file you edit is also generated based on the source (if you run npm run build or npm test, the changes are overwritten).

You could try to get the alias into Prism instead. However, GitHub supports a lot of aliases, so it’s not feasible to add everything to Prism’s core, I think.

In lowlight we recently added support for registering aliases, having something like that does make sense, I think: https://github.com/wooorm/lowlight/commit/3b8f668350726b398376d6a60ac125c003244ccb.

Kikobeats commented 5 years ago

Hello, @wooorm, your reply have a lot of sense, let me open a new issue for achieving that 🙂