TelegramMessenger / libprisma

Code highlight tokenizer written in C++
MIT License
49 stars 13 forks source link

Add auto-refreshing of grammar; add CI #1

Closed MarshalX closed 1 year ago

MarshalX commented 1 year ago

run on dispatch; automatically creates PR

it's still a draft because it loses 6kb of .dat compared to the master branch. idk why

Example of PR: https://github.com/MarshalX/libprisma/pull/4 Example of workflow: https://github.com/MarshalX/libprisma/actions/runs/6426595039/job/17451000932

TODO:

FrayxRulez commented 1 year ago

Hi, thanks for the PR. I've updated generate.js to automatically pull languages from PrismJS CDNs, this shouldn't require opening a browser anymore, but likely needs some changes to write the grammars file in the right place.

MarshalX commented 1 year ago

there is still a difference between repo's grammars.dat and my local one :( local 970kb, repo's 618kb. i tried FF and ci.js that uses chrome via puppeteer

FrayxRulez commented 1 year ago

Hi, in the end I've merged the other PR as it was closer to what I had in mind since the beginning. Thank you for your contribution nonetheless 😁