Skip to content

Support non-flutter environments. #13

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
schultek opened this issue Apr 3, 2025 · 2 comments
Open

Support non-flutter environments. #13

schultek opened this issue Apr 3, 2025 · 2 comments

Comments

@schultek
Copy link

schultek commented Apr 3, 2025

@vlidholt I was looking for a syntax highlighting package on pub, and this one is by far the highest quality one. Sadly it can only be used with flutter and therefore not on pure dart projects like server or web.

For my use-case I need a package that can parse and highlight code on the server during SSR with Jaspr.

Would you consider making this package pure-dart compatible by:

  • Creating a syntax_highlight_core package that is pure dart and contains all the grammar logic
  • Changing the existing syntax_highlighting package to depend on syntax_highlight_core for all the core logic, and just having the flutter stuff.

This way there would be no breaking changes for existing users, but new projects can use syntax_highlight_core.

@schultek
Copy link
Author

schultek commented Apr 3, 2025

Haha I just found out @jtmcdole already forked it for exactly that purpose: https://pub.dev/packages/syntax_highlight_lite

@jtmcdole
Copy link

jtmcdole commented Apr 3, 2025

Ah, I knew I forgot to file an issue. I'm happy to work with folks - I made very opinionated changes to do exactly what you want (jaspr + syntax highlighting).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants