mirror of
https://github.com/Funkoala14/knowledgebase_law.git
synced 2025-06-09 02:08:16 +08:00
22 lines
448 B
JavaScript
22 lines
448 B
JavaScript
'use strict'
|
|
|
|
module.exports = hpkp
|
|
hpkp.displayName = 'hpkp'
|
|
hpkp.aliases = []
|
|
function hpkp(Prism) {
|
|
/**
|
|
* Original by Scott Helme.
|
|
*
|
|
* Reference: https://scotthelme.co.uk/hpkp-cheat-sheet/
|
|
*/
|
|
Prism.languages.hpkp = {
|
|
directive: {
|
|
pattern:
|
|
/\b(?:includeSubDomains|max-age|pin-sha256|preload|report-to|report-uri|strict)(?=[\s;=]|$)/i,
|
|
alias: 'property'
|
|
},
|
|
operator: /=/,
|
|
punctuation: /;/
|
|
}
|
|
}
|