...

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

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

     1[
     2  {"type":"CommentSingle","value":"# You are reading a comment in \".properties\" file."},
     3  {"type":"Text","value":"\n"},
     4  {"type":"CommentSingle","value":"! The exclamation mark can also be used for comments."},
     5  {"type":"Text","value":"\n"},
     6  {"type":"CommentSingle","value":"# Lines with \"properties\" contain a key and a value separated by a delimiting character."},
     7  {"type":"Text","value":"\n"},
     8  {"type":"CommentSingle","value":"# There are 3 delimiting characters: '=' (equal), ':' (colon) and whitespace (space, \\t and \\f)."},
     9  {"type":"Text","value":"\n"},
    10  {"type":"NameAttribute","value":"website"},
    11  {"type":"Text","value":" "},
    12  {"type":"Operator","value":"="},
    13  {"type":"Text","value":" "},
    14  {"type":"LiteralString","value":"https://en.wikipedia.org/"},
    15  {"type":"Text","value":"\n"},
    16  {"type":"NameAttribute","value":"language"},
    17  {"type":"Text","value":" "},
    18  {"type":"Operator","value":":"},
    19  {"type":"Text","value":" "},
    20  {"type":"LiteralString","value":"English"},
    21  {"type":"Text","value":"\n"},
    22  {"type":"CommentSingle","value":"# White space that appears between the key, the value and the delimiter is ignored."},
    23  {"type":"Text","value":"\n"},
    24  {"type":"CommentSingle","value":"# This means that the following are equivalent (other than for readability)."},
    25  {"type":"Text","value":"\n"},
    26  {"type":"NameAttribute","value":"hello"},
    27  {"type":"Operator","value":"="},
    28  {"type":"LiteralString","value":"hello"},
    29  {"type":"Text","value":"\n"},
    30  {"type":"NameAttribute","value":"hello"},
    31  {"type":"Text","value":" "},
    32  {"type":"Operator","value":"="},
    33  {"type":"Text","value":" "},
    34  {"type":"LiteralString","value":"hello"},
    35  {"type":"Text","value":"\n"},
    36  {"type":"NameAttribute","value":"topic"},
    37  {"type":"Text","value":" "},
    38  {"type":"LiteralString","value":".properties files"},
    39  {"type":"Text","value":"\n"},
    40  {"type":"CommentSingle","value":"# A word on a line will just create a key with no value."},
    41  {"type":"Text","value":"\n"},
    42  {"type":"NameAttribute","value":"empty"},
    43  {"type":"Text","value":"\n"},
    44  {"type":"CommentSingle","value":"# Keys with the same name will be overwritten by the key that is the furthest in a file."},
    45  {"type":"Text","value":"\n"},
    46  {"type":"CommentSingle","value":"# For example the final value for \"duplicateKey\" will be \"second\"."},
    47  {"type":"Text","value":"\n"},
    48  {"type":"NameAttribute","value":"duplicateKey"},
    49  {"type":"Text","value":" "},
    50  {"type":"Operator","value":"="},
    51  {"type":"Text","value":" "},
    52  {"type":"LiteralString","value":"first"},
    53  {"type":"Text","value":"\n"},
    54  {"type":"NameAttribute","value":"duplicateKey"},
    55  {"type":"Text","value":" "},
    56  {"type":"Operator","value":"="},
    57  {"type":"Text","value":" "},
    58  {"type":"LiteralString","value":"second"},
    59  {"type":"Text","value":"\n"},
    60  {"type":"CommentSingle","value":"# Adding a \\ at the end of a line means that the value continues to the next line."},
    61  {"type":"Text","value":"\n"},
    62  {"type":"NameAttribute","value":"towLines"},
    63  {"type":"Text","value":" "},
    64  {"type":"Operator","value":"="},
    65  {"type":"Text","value":" "},
    66  {"type":"LiteralString","value":"This line \\\n           continues"},
    67  {"type":"Text","value":"\n"},
    68  {"type":"NameAttribute","value":"threeLines"},
    69  {"type":"Operator","value":":"},
    70  {"type":"Text","value":" "},
    71  {"type":"LiteralString","value":"This value \\\n            has even \\\n            three lines"},
    72  {"type":"Text","value":"\n"},
    73  {"type":"CommentSingle","value":"# If you need to add newlines and carriage returns, they need to be escaped using \\n and \\r respectively."},
    74  {"type":"Text","value":"\n"},
    75  {"type":"CommentSingle","value":"# You can also optionally escape tabs with \\t for readability purposes."},
    76  {"type":"Text","value":"\n"},
    77  {"type":"NameAttribute","value":"valueWithEscapes"},
    78  {"type":"Text","value":" "},
    79  {"type":"Operator","value":"="},
    80  {"type":"Text","value":" "},
    81  {"type":"LiteralString","value":"This is a newline\\n and a carriage return\\r and a tab\\t."},
    82  {"type":"Text","value":"\n"},
    83  {"type":"CommentSingle","value":"# You can also use Unicode escape characters (maximum of four hexadecimal digits)."},
    84  {"type":"Text","value":"\n"},
    85  {"type":"CommentSingle","value":"# In the following example, the value for \"encodedHelloInJapanese\" is \"こんにちは\"."},
    86  {"type":"Text","value":"\n"},
    87  {"type":"NameAttribute","value":"encodedHelloInJapanese"},
    88  {"type":"Text","value":" "},
    89  {"type":"Operator","value":"="},
    90  {"type":"Text","value":" "},
    91  {"type":"LiteralString","value":"\\u3053\\u3093\\u306b\\u3061\\u306f"},
    92  {"type":"Text","value":"\n"},
    93  {"type":"CommentSingle","value":"# But with more modern file encodings like UTF-8, you can directly use supported characters."},
    94  {"type":"Text","value":"\n"},
    95  {"type":"NameAttribute","value":"helloInJapanese"},
    96  {"type":"Text","value":" "},
    97  {"type":"Operator","value":"="},
    98  {"type":"Text","value":" "},
    99  {"type":"LiteralString","value":"こんにちは"},
   100  {"type":"Text","value":"\n  "},
   101  {"type":"CommentSingle","value":"# Comments and keys can have leading whitespace"},
   102  {"type":"Text","value":"\n  "},
   103  {"type":"NameAttribute","value":"foo"},
   104  {"type":"Text","value":" "},
   105  {"type":"Operator","value":"="},
   106  {"type":"Text","value":" "},
   107  {"type":"LiteralString","value":"I have leading whitespace"},
   108  {"type":"Text","value":"\n"},
   109  {"type":"CommentSingle","value":"# Comments and keys can have trailing whitespace as part of the comment   "},
   110  {"type":"Text","value":"\n"},
   111  {"type":"NameAttribute","value":"bar"},
   112  {"type":"Text","value":" "},
   113  {"type":"Operator","value":"="},
   114  {"type":"Text","value":" "},
   115  {"type":"LiteralString","value":"I have trailing whitespace as part of the value  "},
   116  {"type":"Text","value":"\n"}
   117]

View as plain text