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

What language for CSV? #2065

Closed
damienderoistecso opened this issue Sep 25, 2019 · 4 comments · Fixed by #2794
Closed

What language for CSV? #2065

damienderoistecso opened this issue Sep 25, 2019 · 4 comments · Fixed by #2794

Comments

@damienderoistecso
Copy link

What language should I use for highlighting CSV data?

@RunDevelopment
Copy link
Member

Seems like Prism doesn't have a language for CSV yet.

Do we also want to add support for DSV and TSV?

Spec:
https://tools.ietf.org/html/rfc4180

@mAAdhaTTah
Copy link
Member

Any examples of syntax highlighting for CSVs? I'm honestly not sure I've seen that.

@RunDevelopment
Copy link
Member

Well, there's not much to highlight.

Prism.languages.csv = {
	'value': /[^\r\n",]|"(?:[^"]|"")"(?!")/,
	'separator': /,/
};

That would be the whole grammar, or did I forget some feature?

@mrzool
Copy link

mrzool commented Aug 7, 2023

Just something to consider.

Software like bat and the vim plugin rainbow_csv use color to highlight the different columns in a csv by default:

image

It would be great to see prism do this as well.

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

Successfully merging a pull request may close this issue.

4 participants