main
Last change
on this file was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
745 bytes
|
Line | |
---|
1 | 'use strict'
|
---|
2 |
|
---|
3 | module.exports = ignore
|
---|
4 | ignore.displayName = 'ignore'
|
---|
5 | ignore.aliases = ['gitignore', 'hgignore', 'npmignore']
|
---|
6 | function ignore(Prism) {
|
---|
7 | ;(function (Prism) {
|
---|
8 | Prism.languages.ignore = {
|
---|
9 | // https://git-scm.com/docs/gitignore
|
---|
10 | comment: /^#.*/m,
|
---|
11 | entry: {
|
---|
12 | pattern: /\S(?:.*(?:(?:\\ )|\S))?/,
|
---|
13 | alias: 'string',
|
---|
14 | inside: {
|
---|
15 | operator: /^!|\*\*?|\?/,
|
---|
16 | regex: {
|
---|
17 | pattern: /(^|[^\\])\[[^\[\]]*\]/,
|
---|
18 | lookbehind: true
|
---|
19 | },
|
---|
20 | punctuation: /\//
|
---|
21 | }
|
---|
22 | }
|
---|
23 | }
|
---|
24 | Prism.languages.gitignore = Prism.languages.ignore
|
---|
25 | Prism.languages.hgignore = Prism.languages.ignore
|
---|
26 | Prism.languages.npmignore = Prism.languages.ignore
|
---|
27 | })(Prism)
|
---|
28 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.