UNPKG

413 BJavaScriptView Raw
1/**
2 * Original by Scott Helme.
3 *
4 * Reference: https://scotthelme.co.uk/hpkp-cheat-sheet/
5 */
6
7Prism.languages.hpkp = {
8 'directive': {
9 pattern: /\b(?:(?:includeSubDomains|preload|strict)(?: |;)|pin-sha256="[a-zA-Z\d+=/]+"|(?:max-age|report-uri)=|report-to )/,
10 alias: 'keyword'
11 },
12 'safe': {
13 pattern: /\b\d{7,}\b/,
14 alias: 'selector'
15 },
16 'unsafe': {
17 pattern: /\b\d{1,6}\b/,
18 alias: 'function'
19 }
20};