Skip to content
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

Syntax highlighting for oxql #57

Merged
merged 3 commits into from
May 29, 2024
Merged

Syntax highlighting for oxql #57

merged 3 commits into from
May 29, 2024

Conversation

david-crespo
Copy link
Contributor

@david-crespo david-crespo commented May 29, 2024

Basic, but looks pretty good already.

image image

Copy link

vercel bot commented May 29, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
rfd-site ✅ Ready (Inspect) Visit Preview May 29, 2024 8:10pm

hljs.QUOTE_STRING_MODE,
hljs.COMMENT('\\(\\*', '\\*\\)'),
hljs.COMMENT('\\\\\\*', '$'),
{ begin: /\/\\/ }, // relevance booster
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I copied these 4 lines from the other one, but a) I'm not sure what the relevance booster line even is, and b) I don't know if oxql has comments.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope, no concept of comments in OxQL

@benjaminleonard
Copy link
Collaborator

I have a woeful understanding of highlight.js custom languages, but if it works...it works.

We would also need to change this to work with shiki eventually (uses textmate/vscode grammar) – when I get that PR finished.

@david-crespo david-crespo merged commit c42214b into main May 29, 2024
4 checks passed
@david-crespo david-crespo deleted the oxql-highlighting branch May 29, 2024 20:11
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

Successfully merging this pull request may close these issues.

3 participants