discourse/vendor/assets/javascripts/highlightjs/languages/accesslog.min.js
Joffrey JAFFEUX f3dee5863f
FIX: pins down highlight.js to the last commit of the v9 tree (#9921)
The 10+ version has actually a bug with bash. We will wait a little bit before upgrading to 10, we should also make sure any of the breaking changes listed here https://github.com/highlightjs/highlight.js/blob/master/VERSION_10_BREAKING_CHANGES.md are not impacting us.
2020-05-29 10:21:21 +02:00

1 line
600 B
JavaScript

hljs.registerLanguage("accesslog",function(e){var n=["GET","POST","HEAD","PUT","DELETE","CONNECT","OPTIONS","PATCH","TRACE"];return{c:[{cN:"number",b:"^\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?\\b",relevance:5},{cN:"number",b:"\\b\\d+\\b",relevance:0},{cN:"string",b:'"('+n.join("|")+")",e:'"',k:n.join(" "),i:"\\n",relevance:5,c:[{b:"HTTP/[12]\\.\\d",relevance:5}]},{cN:"string",b:/\[\d[^\]\n]{8,}\]/,i:"\\n",relevance:1},{cN:"string",b:/\[/,e:/\]/,i:"\\n",relevance:0},{cN:"string",b:'"Mozilla/\\d\\.\\d \\(',e:'"',i:"\\n",relevance:3},{cN:"string",b:'"',e:'"',i:"\\n",relevance:0}]}});