1
0
mirror of https://github.com/alecthomas/chroma.git synced 2025-02-13 13:28:27 +02:00
chroma/lexers/testdata/caddyfile.expected
2020-05-17 16:39:13 +10:00

252 lines
9.5 KiB
Plaintext

[
{"type":"Punctuation","value":"{"},
{"type":"Text","value":"\n\t"},
{"type":"Keyword","value":"debug"},
{"type":"Text","value":"\n\t"},
{"type":"Keyword","value":"admin"},
{"type":"Text","value":" "},
{"type":"NameConstant","value":"off"},
{"type":"Text","value":"\n\t"},
{"type":"Keyword","value":"on_demand_tls"},
{"type":"Text","value":" "},
{"type":"Punctuation","value":"{"},
{"type":"Text","value":"\n\t\t"},
{"type":"Keyword","value":"ask"},
{"type":"Text","value":" "},
{"type":"LiteralString","value":"https://example.com"},
{"type":"Text","value":"\n\t"},
{"type":"Punctuation","value":"}"},
{"type":"Text","value":"\n"},
{"type":"Punctuation","value":"}"},
{"type":"Text","value":"\n\n"},
{"type":"NameVariableAnonymous","value":"(blocking)"},
{"type":"Text","value":" "},
{"type":"Punctuation","value":"{"},
{"type":"Text","value":" \n\t"},
{"type":"NameDecorator","value":"@blocked"},
{"type":"Text","value":" "},
{"type":"Punctuation","value":"{"},
{"type":"Text","value":"\n\t\t"},
{"type":"Keyword","value":"path"},
{"type":"Text","value":" "},
{"type":"LiteralString","value":"*.txt"},
{"type":"Text","value":" "},
{"type":"LiteralString","value":"*.md"},
{"type":"Text","value":" "},
{"type":"LiteralString","value":"*.mdown"},
{"type":"Text","value":" "},
{"type":"LiteralString","value":"/site/*"},
{"type":"Text","value":"\n\t"},
{"type":"Punctuation","value":"}"},
{"type":"Text","value":"\n\t"},
{"type":"Keyword","value":"redir"},
{"type":"Text","value":" "},
{"type":"NameDecorator","value":"@blocked"},
{"type":"Text","value":" "},
{"type":"LiteralString","value":"/"},
{"type":"Text","value":"\n"},
{"type":"Punctuation","value":"}"},
{"type":"Text","value":"\n\n"},
{"type":"GenericHeading","value":"example.com"},
{"type":"Text","value":", "},
{"type":"GenericHeading","value":"fake.org"},
{"type":"Text","value":", "},
{"type":"LiteralStringEscape","value":"{$ENV_SITE}"},
{"type":"Text","value":" "},
{"type":"Punctuation","value":"{"},
{"type":"Text","value":"\n\t"},
{"type":"Keyword","value":"root"},
{"type":"Text","value":" "},
{"type":"NameDecorator","value":"*"},
{"type":"Text","value":" "},
{"type":"LiteralString","value":"/srv"},
{"type":"Text","value":"\n\n\t"},
{"type":"Keyword","value":"respond"},
{"type":"Text","value":" "},
{"type":"NameDecorator","value":"/get-env"},
{"type":"Text","value":" "},
{"type":"LiteralStringEscape","value":"{$ENV_VAR}"},
{"type":"Text","value":"\n\n\t"},
{"type":"Keyword","value":"tls"},
{"type":"Text","value":" "},
{"type":"NameConstant","value":"off"},
{"type":"Text","value":"\n\n\t"},
{"type":"Keyword","value":"route"},
{"type":"Text","value":" "},
{"type":"Punctuation","value":"{"},
{"type":"CommentSingle","value":"\n\t\t# Add trailing slash for directory requests\n"},
{"type":"Text","value":"\t\t"},
{"type":"NameDecorator","value":"@canonicalPath"},
{"type":"Text","value":" "},
{"type":"Punctuation","value":"{"},
{"type":"Text","value":"\n\t\t\t"},
{"type":"Keyword","value":"file"},
{"type":"Text","value":" "},
{"type":"Punctuation","value":"{"},
{"type":"Text","value":"\n\t\t\t\t"},
{"type":"Keyword","value":"try_files"},
{"type":"Text","value":" "},
{"type":"LiteralStringEscape","value":"{path}"},
{"type":"LiteralString","value":"/index.php"},
{"type":"Text","value":"\n\t\t\t"},
{"type":"Punctuation","value":"}"},
{"type":"Text","value":"\n\t\t\t"},
{"type":"Keyword","value":"not"},
{"type":"Text","value":" "},
{"type":"Keyword","value":"path"},
{"type":"Text","value":" "},
{"type":"LiteralString","value":"*/"},
{"type":"Text","value":"\n\t\t"},
{"type":"Punctuation","value":"}"},
{"type":"Text","value":"\n\t\t"},
{"type":"Keyword","value":"redir"},
{"type":"Text","value":" "},
{"type":"NameDecorator","value":"@canonicalPath"},
{"type":"Text","value":" "},
{"type":"LiteralStringEscape","value":"{path}"},
{"type":"LiteralString","value":"/"},
{"type":"Text","value":" "},
{"type":"LiteralNumberInteger","value":"308"},
{"type":"CommentSingle","value":"\n\n\t\t# If the requested file does not exist, try index files\n"},
{"type":"Text","value":"\t\t"},
{"type":"NameDecorator","value":"@indexFiles"},
{"type":"Text","value":" "},
{"type":"Punctuation","value":"{"},
{"type":"Text","value":"\n\t\t\t"},
{"type":"Keyword","value":"file"},
{"type":"Text","value":" "},
{"type":"Punctuation","value":"{"},
{"type":"Text","value":"\n\t\t\t\t"},
{"type":"Keyword","value":"try_files"},
{"type":"Text","value":" "},
{"type":"LiteralStringEscape","value":"{path}"},
{"type":"Text","value":" "},
{"type":"LiteralStringEscape","value":"{path}"},
{"type":"LiteralString","value":"/index.php"},
{"type":"Text","value":" "},
{"type":"LiteralString","value":"index.php"},
{"type":"Text","value":"\n\t\t\t\t"},
{"type":"Keyword","value":"split_path"},
{"type":"Text","value":" "},
{"type":"LiteralString","value":".php"},
{"type":"Text","value":"\n\t\t\t"},
{"type":"Punctuation","value":"}"},
{"type":"Text","value":"\n\t\t"},
{"type":"Punctuation","value":"}"},
{"type":"Text","value":"\n\t\t"},
{"type":"Keyword","value":"rewrite"},
{"type":"Text","value":" "},
{"type":"NameDecorator","value":"@indexFiles"},
{"type":"Text","value":" "},
{"type":"LiteralStringEscape","value":"{http.matchers.file.relative}"},
{"type":"CommentSingle","value":"\n\n\t\t# Proxy PHP files to the FastCGI responder\n"},
{"type":"Text","value":"\t\t"},
{"type":"NameDecorator","value":"@phpFiles"},
{"type":"Text","value":" "},
{"type":"Punctuation","value":"{"},
{"type":"Text","value":"\n\t\t\t"},
{"type":"Keyword","value":"path"},
{"type":"Text","value":" "},
{"type":"LiteralString","value":"*.php"},
{"type":"Text","value":"\n\t\t"},
{"type":"Punctuation","value":"}"},
{"type":"Text","value":"\n\t\t"},
{"type":"Keyword","value":"reverse_proxy"},
{"type":"Text","value":" "},
{"type":"NameDecorator","value":"@phpFiles"},
{"type":"Text","value":" "},
{"type":"LiteralString","value":"unix//var/run/php7.4-fpm.sock"},
{"type":"Text","value":" "},
{"type":"Punctuation","value":"{"},
{"type":"Text","value":"\n\t\t\t"},
{"type":"Keyword","value":"transport"},
{"type":"Text","value":" "},
{"type":"LiteralString","value":"fastcgi"},
{"type":"Text","value":" "},
{"type":"Punctuation","value":"{"},
{"type":"Text","value":"\n\t\t\t\t"},
{"type":"Keyword","value":"split"},
{"type":"Text","value":" "},
{"type":"LiteralString","value":".php"},
{"type":"Text","value":"\n\t\t\t"},
{"type":"Punctuation","value":"}"},
{"type":"Text","value":"\n\t\t"},
{"type":"Punctuation","value":"}"},
{"type":"Text","value":"\n\t"},
{"type":"Punctuation","value":"}"},
{"type":"Text","value":"\n\n\t"},
{"type":"NameDecorator","value":"@encode_exts"},
{"type":"Text","value":" "},
{"type":"Punctuation","value":"{"},
{"type":"Text","value":"\n\t\t"},
{"type":"Keyword","value":"path"},
{"type":"Text","value":" "},
{"type":"LiteralString","value":"/"},
{"type":"Text","value":" "},
{"type":"LiteralString","value":"*.html"},
{"type":"Text","value":" "},
{"type":"LiteralString","value":"*.js"},
{"type":"Text","value":" "},
{"type":"LiteralString","value":"*.css"},
{"type":"Text","value":" "},
{"type":"LiteralString","value":"*.svg"},
{"type":"Text","value":"\n\t"},
{"type":"Punctuation","value":"}"},
{"type":"Text","value":"\n\n\t"},
{"type":"Keyword","value":"header"},
{"type":"Text","value":" "},
{"type":"Punctuation","value":"{"},
{"type":"Text","value":"\n\t\t"},
{"type":"Keyword","value":"X-Content-Type-Options"},
{"type":"Text","value":" "},
{"type":"LiteralString","value":"nosniff"},
{"type":"Text","value":"\n\t\t"},
{"type":"Keyword","value":"X-XSS-Protection"},
{"type":"Text","value":" "},
{"type":"LiteralString","value":"\"1;"},
{"type":"Text","value":" "},
{"type":"LiteralString","value":"mode=block\""},
{"type":"Text","value":"\n\t\t"},
{"type":"Keyword","value":"X-Robots-Tag"},
{"type":"Text","value":" "},
{"type":"LiteralString","value":"none"},
{"type":"Text","value":"\n\t\t"},
{"type":"Keyword","value":"Content-Security-Policy"},
{"type":"Text","value":" "},
{"type":"LiteralString","value":"\"frame-ancestors"},
{"type":"Text","value":" "},
{"type":"LiteralString","value":"'self'\""},
{"type":"Text","value":"\n\t\t"},
{"type":"Keyword","value":"X-Frame-Options"},
{"type":"Text","value":" "},
{"type":"LiteralString","value":"DENY"},
{"type":"Text","value":"\n\t\t"},
{"type":"Keyword","value":"Referrer-Policy"},
{"type":"Text","value":" "},
{"type":"LiteralString","value":"same-origin"},
{"type":"Text","value":"\n\t"},
{"type":"Punctuation","value":"}"},
{"type":"Text","value":"\n\n\t"},
{"type":"NameDecorator","value":"@singleLine"},
{"type":"Text","value":" "},
{"type":"Keyword","value":"not"},
{"type":"Text","value":" "},
{"type":"Keyword","value":"path"},
{"type":"Text","value":" "},
{"type":"LiteralString","value":"/matcher"},
{"type":"Text","value":"\n\t"},
{"type":"Keyword","value":"respond"},
{"type":"Text","value":" "},
{"type":"NameDecorator","value":"@singleLine"},
{"type":"Text","value":" "},
{"type":"LiteralString","value":"\"Awesome.\""},
{"type":"Text","value":"\n\n\t"},
{"type":"Keyword","value":"import"},
{"type":"Text","value":" "},
{"type":"NameVariableMagic","value":"blocking"},
{"type":"Text","value":"\n\n\t"},
{"type":"Keyword","value":"file_server"},
{"type":"Text","value":"\n"},
{"type":"Punctuation","value":"}"}
]