Skip to content
Permalink
Browse files
HSTS: Improved tokenization (#3277)
  • Loading branch information
RunDevelopment committed Dec 18, 2021
1 parent a943f2b commit 3d708b9780b68bdc60e638ddad9156d7f4efa92b
@@ -6,15 +6,9 @@

Prism.languages.hsts = {
'directive': {
pattern: /\b(?:max-age=|includeSubDomains|preload)/,
alias: 'keyword'
pattern: /\b(?:includeSubDomains|max-age|preload)(?=[\s;=]|$)/i,
alias: 'property'
},
'safe': {
pattern: /\b\d{8,}\b/,
alias: 'selector'
},
'unsafe': {
pattern: /\b\d{1,7}\b/,
alias: 'function'
}
'operator': /=/,
'punctuation': /;/
};

Some generated files are not rendered by default. Learn more.

@@ -0,0 +1,27 @@
max-age=0;
max-age="0";
max-age=31536000;
max-age="31536000"

----------------------------------------------------

[
["directive", "max-age"],
["operator", "="],
"0",
["punctuation", ";"],

["directive", "max-age"],
["operator", "="],
"\"0\"",
["punctuation", ";"],

["directive", "max-age"],
["operator", "="],
"31536000",
["punctuation", ";"],

["directive", "max-age"],
["operator", "="],
"\"31536000\""
]

This file was deleted.

This file was deleted.

0 comments on commit 3d708b9

Please sign in to comment.