You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
556 B
24 lines
556 B
// https://go.dev/ref/mod#go-mod-file-module |
|
|
|
Prism.languages['go-mod'] = Prism.languages['go-module'] = { |
|
'comment': { |
|
pattern: /\/\/.*/, |
|
greedy: true |
|
}, |
|
'version': { |
|
pattern: /(^|[\s()[\],])v\d+\.\d+\.\d+(?:[+-][-+.\w]*)?(?![^\s()[\],])/, |
|
lookbehind: true, |
|
alias: 'number' |
|
}, |
|
'go-version': { |
|
pattern: /((?:^|\s)go\s+)\d+(?:\.\d+){1,2}/, |
|
lookbehind: true, |
|
alias: 'number' |
|
}, |
|
'keyword': { |
|
pattern: /^([ \t]*)(?:exclude|go|module|replace|require|retract)\b/m, |
|
lookbehind: true |
|
}, |
|
'operator': /=>/, |
|
'punctuation': /[()[\],]/ |
|
};
|
|
|