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

Added support for .gitignore #2481

Merged
merged 7 commits into from Jul 22, 2020
Merged

Conversation

@osipxd
Copy link
Contributor

@osipxd osipxd commented Jul 22, 2020

Closes #2475

I've called the main language ignore because it can be used in many ignore configs. Like .hgignore or .npmignore.
Implementation inspired with .ignore plugin.

@osipxd osipxd force-pushed the feature/gitignore branch from e1da8a6 to d7b14fa Jul 22, 2020
@osipxd osipxd changed the title Added support fro .gitignore Added support for .gitignore Jul 22, 2020
Copy link
Member

@RunDevelopment RunDevelopment left a comment

Thank you @osipxd for this language definition!

A few minor nits and one questions:
What are headers and sections? The spec doesn't mention those.

Also, it might be nice to have an alias for .npmignore files edit: and .hgignore files.

components/prism-ignore.js Outdated Show resolved Hide resolved
components/prism-ignore.js Outdated Show resolved Hide resolved
components/prism-ignore.js Outdated Show resolved Hide resolved
components/prism-ignore.js Outdated Show resolved Hide resolved
@osipxd
Copy link
Contributor Author

@osipxd osipxd commented Jul 22, 2020

What are headers and sections? The spec doesn't mention those.

It isn't from specification it is just additional highlight to better structurize gitignore file in case if it is large.
I'll remove section and header if you think it will be better.
image

Also, it might be nice to have an alias for .npmignore files edit: and .hgignore files.

Ok, I'll add it

@osipxd osipxd requested a review from RunDevelopment Jul 22, 2020
@osipxd osipxd force-pushed the feature/gitignore branch from 30d0a3c to f7a8e29 Jul 22, 2020
@RunDevelopment
Copy link
Member

@RunDevelopment RunDevelopment commented Jul 22, 2020

It isn't from specification it is just additional highlight to better structurize gitignore file in case if it is large.

It tried searching for this practice and I wasn't able to find anything. It doesn't seem to be common, so let's just go with the spec for now and remove section and header.

@RunDevelopment RunDevelopment merged commit 3fcce6f into PrismJS:master Jul 22, 2020
1 check passed
@RunDevelopment
Copy link
Member

@RunDevelopment RunDevelopment commented Jul 22, 2020

Thank you for contributing @osipxd!

quentinvernot added a commit to TankerHQ/prismjs that referenced this issue Sep 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

2 participants