csp.js 544 B

123456789101112131415161718192021
  1. module.exports = function(hljs) {
  2. return {
  3. case_insensitive: false,
  4. lexemes: '[a-zA-Z][a-zA-Z0-9_-]*',
  5. keywords: {
  6. keyword: 'base-uri child-src connect-src default-src font-src form-action' +
  7. ' frame-ancestors frame-src img-src media-src object-src plugin-types' +
  8. ' report-uri sandbox script-src style-src',
  9. },
  10. contains: [
  11. {
  12. className: 'string',
  13. begin: "'", end: "'"
  14. },
  15. {
  16. className: 'attribute',
  17. begin: '^Content', end: ':', excludeEnd: true,
  18. },
  19. ]
  20. };
  21. };