Skip to content

Added support for .gitignore#2481

Merged
RunDevelopment merged 7 commits into
PrismJS:masterfrom
osipxd:feature/gitignore
Jul 22, 2020
Merged

Added support for .gitignore#2481
RunDevelopment merged 7 commits into
PrismJS:masterfrom
osipxd:feature/gitignore

Conversation

@osipxd

@osipxd osipxd commented Jul 22, 2020

Copy link
Copy Markdown
Contributor

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 Compare July 22, 2020 10:43
@osipxd osipxd changed the title Added support fro .gitignore Added support for .gitignore Jul 22, 2020

@RunDevelopment RunDevelopment left a comment

Copy link
Copy Markdown
Member

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.

Comment thread components/prism-ignore.js Outdated
Comment thread components/prism-ignore.js Outdated
Comment thread components/prism-ignore.js
Comment thread components/prism-ignore.js Outdated
@osipxd

osipxd commented Jul 22, 2020

Copy link
Copy Markdown
Contributor Author

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 July 22, 2020 13:01
@osipxd
osipxd force-pushed the feature/gitignore branch from 30d0a3c to f7a8e29 Compare July 22, 2020 13:06
@RunDevelopment

Copy link
Copy Markdown
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
Copy Markdown
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