This repository has been archived on 2024-06-20. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
coffee.pygments/tests/examplefiles/properties/java.properties
Jean Abou-Samra fdf182a7af
Improve Java properties lexer (#2404)
Use special lexer rules for escapes; fixes catastrophic backtracking,
and highlights them too.

Fixes #2356
2023-04-17 20:14:42 +02:00

35 lines
733 B
Properties

#https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Properties.htm
# mixing spaces
Truth = Beauty
Truth:Beauty
Truth Beauty
Truth :Beauty
! line continuations and escapes
fruits apple, banana, pear, \
cantaloupe, watermelon, \
kiwi, mango
key = \
value1 \\\
and value2\\
key\ 2 = value
key\\ 3 = value3
key \
= value
! empty keys and edge cases
key1 =
key2
key3 the value3
key4 the:value4
key5 the=value5
key6=the value6
! escapes in keys
key\ with\ spaces = value
key\nwith\nnewlines = value\nwith\nnewlines
! indented comment
! line continuations do \
not = work for comments