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 changed the title Added support fro .gitignore Added support for .gitignore Jul 22, 2020
Copy link
Member

@RunDevelopment RunDevelopment left a comment

Choose a reason for hiding this comment

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

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 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

@RunDevelopment
Copy link
Member

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
@RunDevelopment
Copy link
Member

Thank you for contributing @osipxd!

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

Successfully merging this pull request may close these issues.

Add gitignore support
2 participants