aboutsummaryrefslogtreecommitdiffstats
path: root/public/prism/prism-bro.min.js
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2021-12-30 19:47:21 +0100
committerArmand Philippot <git@armandphilippot.com>2021-12-30 19:47:21 +0100
commita98b5ea6fe8e8cc98a55e0fd793e6e8660ea31c1 (patch)
tree542810ab5aef99150db228bb54fd58303dcb31c7 /public/prism/prism-bro.min.js
parentab355897a12b7bda1089a44de326d41455a0f7a3 (diff)
chore: add prismjs for syntax highlighting
Diffstat (limited to 'public/prism/prism-bro.min.js')
-rw-r--r--public/prism/prism-bro.min.js24
1 files changed, 24 insertions, 0 deletions
diff --git a/public/prism/prism-bro.min.js b/public/prism/prism-bro.min.js
new file mode 100644
index 0000000..3c550b3
--- /dev/null
+++ b/public/prism/prism-bro.min.js
@@ -0,0 +1,24 @@
+Prism.languages.bro = {
+ comment: {
+ pattern: /(^|[^\\$])#.*/,
+ lookbehind: !0,
+ inside: { italic: /\b(?:FIXME|TODO|XXX)\b/ },
+ },
+ string: {
+ pattern: /(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,
+ greedy: !0,
+ },
+ boolean: /\b[TF]\b/,
+ function: {
+ pattern: /(\b(?:event|function|hook)[ \t]+)\w+(?:::\w+)?/,
+ lookbehind: !0,
+ },
+ builtin:
+ /(?:@(?:load(?:-(?:plugin|sigs))?|unload|prefixes|ifn?def|else|(?:end)?if|DIR|FILENAME))|(?:&?(?:add_func|create_expire|default|delete_func|encrypt|error_handler|expire_func|group|log|mergeable|optional|persistent|priority|raw_output|read_expire|redef|rotate_interval|rotate_size|synchronized|type_column|write_expire))/,
+ constant: { pattern: /(\bconst[ \t]+)\w+/i, lookbehind: !0 },
+ keyword:
+ /\b(?:add|addr|alarm|any|bool|break|const|continue|count|delete|double|else|enum|event|export|file|for|function|global|hook|if|in|int|interval|local|module|next|of|opaque|pattern|port|print|record|return|schedule|set|string|subnet|table|time|timeout|using|vector|when)\b/,
+ operator: /--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&|\|\|?|\?|\*|\/|~|\^|%/,
+ number: /\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,
+ punctuation: /[{}[\];(),.:]/,
+};