...

Text file src/github.com/alecthomas/chroma/lexers/testdata/caddyfile.expected

Documentation: github.com/alecthomas/chroma/lexers/testdata

     1[
     2  {"type":"Punctuation","value":"{"},
     3  {"type":"Text","value":"\n\t"},
     4  {"type":"Keyword","value":"debug"},
     5  {"type":"Text","value":"\n\t"},
     6  {"type":"Keyword","value":"admin"},
     7  {"type":"Text","value":" "},
     8  {"type":"NameConstant","value":"off"},
     9  {"type":"Text","value":"\n\t"},
    10  {"type":"Keyword","value":"on_demand_tls"},
    11  {"type":"Text","value":" "},
    12  {"type":"Punctuation","value":"{"},
    13  {"type":"Text","value":"\n\t\t"},
    14  {"type":"Keyword","value":"ask"},
    15  {"type":"Text","value":" "},
    16  {"type":"LiteralString","value":"https://example.com"},
    17  {"type":"Text","value":"\n\t"},
    18  {"type":"Punctuation","value":"}"},
    19  {"type":"Text","value":"\n"},
    20  {"type":"Punctuation","value":"}"},
    21  {"type":"Text","value":"\n\n"},
    22  {"type":"NameVariableAnonymous","value":"(blocking)"},
    23  {"type":"Text","value":" "},
    24  {"type":"Punctuation","value":"{"},
    25  {"type":"Text","value":"  \n\t"},
    26  {"type":"NameDecorator","value":"@blocked"},
    27  {"type":"Text","value":" "},
    28  {"type":"Punctuation","value":"{"},
    29  {"type":"Text","value":"\n\t\t"},
    30  {"type":"Keyword","value":"path"},
    31  {"type":"Text","value":" "},
    32  {"type":"LiteralString","value":"*.txt"},
    33  {"type":"Text","value":" "},
    34  {"type":"LiteralString","value":"*.md"},
    35  {"type":"Text","value":" "},
    36  {"type":"LiteralString","value":"*.mdown"},
    37  {"type":"Text","value":" "},
    38  {"type":"LiteralString","value":"/site/*"},
    39  {"type":"Text","value":"\n\t"},
    40  {"type":"Punctuation","value":"}"},
    41  {"type":"Text","value":"\n\t"},
    42  {"type":"Keyword","value":"redir"},
    43  {"type":"Text","value":" "},
    44  {"type":"NameDecorator","value":"@blocked"},
    45  {"type":"Text","value":" "},
    46  {"type":"LiteralString","value":"/"},
    47  {"type":"Text","value":"\n"},
    48  {"type":"Punctuation","value":"}"},
    49  {"type":"Text","value":"\n\n"},
    50  {"type":"GenericHeading","value":"example.com"},
    51  {"type":"Text","value":", "},
    52  {"type":"GenericHeading","value":"fake.org"},
    53  {"type":"Text","value":", "},
    54  {"type":"LiteralStringEscape","value":"{$ENV_SITE}"},
    55  {"type":"Text","value":" "},
    56  {"type":"Punctuation","value":"{"},
    57  {"type":"Text","value":"\n\t"},
    58  {"type":"Keyword","value":"root"},
    59  {"type":"Text","value":" "},
    60  {"type":"NameDecorator","value":"*"},
    61  {"type":"Text","value":" "},
    62  {"type":"LiteralString","value":"/srv"},
    63  {"type":"Text","value":"\n\n\t"},
    64  {"type":"Keyword","value":"respond"},
    65  {"type":"Text","value":" "},
    66  {"type":"NameDecorator","value":"/get-env"},
    67  {"type":"Text","value":" "},
    68  {"type":"LiteralStringEscape","value":"{$ENV_VAR}"},
    69  {"type":"Text","value":"\n\n\t"},
    70  {"type":"Keyword","value":"tls"},
    71  {"type":"Text","value":" "},
    72  {"type":"NameConstant","value":"off"},
    73  {"type":"Text","value":"\n\n\t"},
    74  {"type":"Keyword","value":"route"},
    75  {"type":"Text","value":" "},
    76  {"type":"Punctuation","value":"{"},
    77  {"type":"CommentSingle","value":"\n\t\t# Add trailing slash for directory requests\n"},
    78  {"type":"Text","value":"\t\t"},
    79  {"type":"NameDecorator","value":"@canonicalPath"},
    80  {"type":"Text","value":" "},
    81  {"type":"Punctuation","value":"{"},
    82  {"type":"Text","value":"\n\t\t\t"},
    83  {"type":"Keyword","value":"file"},
    84  {"type":"Text","value":" "},
    85  {"type":"Punctuation","value":"{"},
    86  {"type":"Text","value":"\n\t\t\t\t"},
    87  {"type":"Keyword","value":"try_files"},
    88  {"type":"Text","value":" "},
    89  {"type":"LiteralStringEscape","value":"{path}"},
    90  {"type":"LiteralString","value":"/index.php"},
    91  {"type":"Text","value":"\n\t\t\t"},
    92  {"type":"Punctuation","value":"}"},
    93  {"type":"Text","value":"\n\t\t\t"},
    94  {"type":"Keyword","value":"not"},
    95  {"type":"Text","value":" "},
    96  {"type":"Keyword","value":"path"},
    97  {"type":"Text","value":" "},
    98  {"type":"LiteralString","value":"*/"},
    99  {"type":"Text","value":"\n\t\t"},
   100  {"type":"Punctuation","value":"}"},
   101  {"type":"Text","value":"\n\t\t"},
   102  {"type":"Keyword","value":"redir"},
   103  {"type":"Text","value":" "},
   104  {"type":"NameDecorator","value":"@canonicalPath"},
   105  {"type":"Text","value":" "},
   106  {"type":"LiteralStringEscape","value":"{path}"},
   107  {"type":"LiteralString","value":"/"},
   108  {"type":"Text","value":" "},
   109  {"type":"LiteralNumberInteger","value":"308"},
   110  {"type":"CommentSingle","value":"\n\n\t\t# If the requested file does not exist, try index files\n"},
   111  {"type":"Text","value":"\t\t"},
   112  {"type":"NameDecorator","value":"@indexFiles"},
   113  {"type":"Text","value":" "},
   114  {"type":"Punctuation","value":"{"},
   115  {"type":"Text","value":"\n\t\t\t"},
   116  {"type":"Keyword","value":"file"},
   117  {"type":"Text","value":" "},
   118  {"type":"Punctuation","value":"{"},
   119  {"type":"Text","value":"\n\t\t\t\t"},
   120  {"type":"Keyword","value":"try_files"},
   121  {"type":"Text","value":" "},
   122  {"type":"LiteralStringEscape","value":"{path}"},
   123  {"type":"Text","value":" "},
   124  {"type":"LiteralStringEscape","value":"{path}"},
   125  {"type":"LiteralString","value":"/index.php"},
   126  {"type":"Text","value":" "},
   127  {"type":"LiteralString","value":"index.php"},
   128  {"type":"Text","value":"\n\t\t\t\t"},
   129  {"type":"Keyword","value":"split_path"},
   130  {"type":"Text","value":" "},
   131  {"type":"LiteralString","value":".php"},
   132  {"type":"Text","value":"\n\t\t\t"},
   133  {"type":"Punctuation","value":"}"},
   134  {"type":"Text","value":"\n\t\t"},
   135  {"type":"Punctuation","value":"}"},
   136  {"type":"Text","value":"\n\t\t"},
   137  {"type":"Keyword","value":"rewrite"},
   138  {"type":"Text","value":" "},
   139  {"type":"NameDecorator","value":"@indexFiles"},
   140  {"type":"Text","value":" "},
   141  {"type":"LiteralStringEscape","value":"{http.matchers.file.relative}"},
   142  {"type":"CommentSingle","value":"\n\n\t\t# Proxy PHP files to the FastCGI responder\n"},
   143  {"type":"Text","value":"\t\t"},
   144  {"type":"NameDecorator","value":"@phpFiles"},
   145  {"type":"Text","value":" "},
   146  {"type":"Punctuation","value":"{"},
   147  {"type":"Text","value":"\n\t\t\t"},
   148  {"type":"Keyword","value":"path"},
   149  {"type":"Text","value":" "},
   150  {"type":"LiteralString","value":"*.php"},
   151  {"type":"Text","value":"\n\t\t"},
   152  {"type":"Punctuation","value":"}"},
   153  {"type":"Text","value":"\n\t\t"},
   154  {"type":"Keyword","value":"reverse_proxy"},
   155  {"type":"Text","value":" "},
   156  {"type":"NameDecorator","value":"@phpFiles"},
   157  {"type":"Text","value":" "},
   158  {"type":"LiteralString","value":"unix//var/run/php7.4-fpm.sock"},
   159  {"type":"Text","value":" "},
   160  {"type":"Punctuation","value":"{"},
   161  {"type":"Text","value":"\n\t\t\t"},
   162  {"type":"Keyword","value":"transport"},
   163  {"type":"Text","value":" "},
   164  {"type":"LiteralString","value":"fastcgi"},
   165  {"type":"Text","value":" "},
   166  {"type":"Punctuation","value":"{"},
   167  {"type":"Text","value":"\n\t\t\t\t"},
   168  {"type":"Keyword","value":"split"},
   169  {"type":"Text","value":" "},
   170  {"type":"LiteralString","value":".php"},
   171  {"type":"Text","value":"\n\t\t\t"},
   172  {"type":"Punctuation","value":"}"},
   173  {"type":"Text","value":"\n\t\t"},
   174  {"type":"Punctuation","value":"}"},
   175  {"type":"Text","value":"\n\t"},
   176  {"type":"Punctuation","value":"}"},
   177  {"type":"Text","value":"\n\n\t"},
   178  {"type":"NameDecorator","value":"@encode_exts"},
   179  {"type":"Text","value":" "},
   180  {"type":"Punctuation","value":"{"},
   181  {"type":"Text","value":"\n\t\t"},
   182  {"type":"Keyword","value":"path"},
   183  {"type":"Text","value":" "},
   184  {"type":"LiteralString","value":"/"},
   185  {"type":"Text","value":" "},
   186  {"type":"LiteralString","value":"*.html"},
   187  {"type":"Text","value":" "},
   188  {"type":"LiteralString","value":"*.js"},
   189  {"type":"Text","value":" "},
   190  {"type":"LiteralString","value":"*.css"},
   191  {"type":"Text","value":" "},
   192  {"type":"LiteralString","value":"*.svg"},
   193  {"type":"Text","value":"\n\t"},
   194  {"type":"Punctuation","value":"}"},
   195  {"type":"Text","value":"\n\n\t"},
   196  {"type":"Keyword","value":"header"},
   197  {"type":"Text","value":" "},
   198  {"type":"Punctuation","value":"{"},
   199  {"type":"Text","value":"\n\t\t"},
   200  {"type":"Keyword","value":"X-Content-Type-Options"},
   201  {"type":"Text","value":" "},
   202  {"type":"LiteralString","value":"nosniff"},
   203  {"type":"Text","value":"\n\t\t"},
   204  {"type":"Keyword","value":"X-XSS-Protection"},
   205  {"type":"Text","value":" "},
   206  {"type":"LiteralString","value":"\"1;"},
   207  {"type":"Text","value":" "},
   208  {"type":"LiteralString","value":"mode=block\""},
   209  {"type":"Text","value":"\n\t\t"},
   210  {"type":"Keyword","value":"X-Robots-Tag"},
   211  {"type":"Text","value":" "},
   212  {"type":"LiteralString","value":"none"},
   213  {"type":"Text","value":"\n\t\t"},
   214  {"type":"Keyword","value":"Content-Security-Policy"},
   215  {"type":"Text","value":" "},
   216  {"type":"LiteralString","value":"\"frame-ancestors"},
   217  {"type":"Text","value":" "},
   218  {"type":"LiteralString","value":"'self'\""},
   219  {"type":"Text","value":"\n\t\t"},
   220  {"type":"Keyword","value":"X-Frame-Options"},
   221  {"type":"Text","value":" "},
   222  {"type":"LiteralString","value":"DENY"},
   223  {"type":"Text","value":"\n\t\t"},
   224  {"type":"Keyword","value":"Referrer-Policy"},
   225  {"type":"Text","value":" "},
   226  {"type":"LiteralString","value":"same-origin"},
   227  {"type":"Text","value":"\n\t"},
   228  {"type":"Punctuation","value":"}"},
   229  {"type":"Text","value":"\n\n\t"},
   230  {"type":"NameDecorator","value":"@singleLine"},
   231  {"type":"Text","value":" "},
   232  {"type":"Keyword","value":"not"},
   233  {"type":"Text","value":" "},
   234  {"type":"Keyword","value":"path"},
   235  {"type":"Text","value":" "},
   236  {"type":"LiteralString","value":"/matcher"},
   237  {"type":"Text","value":"\n\t"},
   238  {"type":"Keyword","value":"respond"},
   239  {"type":"Text","value":" "},
   240  {"type":"NameDecorator","value":"@singleLine"},
   241  {"type":"Text","value":" "},
   242  {"type":"LiteralString","value":"\"Awesome.\""},
   243  {"type":"Text","value":"\n\n\t"},
   244  {"type":"Keyword","value":"import"},
   245  {"type":"Text","value":" "},
   246  {"type":"NameVariableMagic","value":"blocking"},
   247  {"type":"Text","value":"\n\n\t"},
   248  {"type":"Keyword","value":"file_server"},
   249  {"type":"Text","value":"\n"},
   250  {"type":"Punctuation","value":"}"}
   251]

View as plain text