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/snippets/toml/table-header-string.txt
Jean Abou Samra 44398d29ea
Revise TOML lexer
The new lexer matches the TOML spec much more closely.

User-visible differences should be these:

* Add MIME type
* Highlight string escapes
* Recognize \uXXXX and \UXXXX escapes
* Also recognize booleans if they are followed by a comment
* Fix single quotes inside multiline literal strings (closes #2488)
* Prevent multiline literal strings from eating comments
* Add multiline basic strings (""")
* Improve datetime recognition: recognize times without
  dates, dates without times and datetimes without time zone;
  allow sub-millisecond precision
* Recognize floats with exponents (they used not to be recognized
  when having a decimal point)
* Recognize binary, octal and hex literals
* Recognize strings inside table headers
* Recognize table headers followed by comments
* Don't parse sequences of digits as integers when they
  are actually keys

Includes several new tests, most of which were not working before.
2023-11-08 22:06:53 +01:00

27 lines
731 B
Text

---input---
[table.header.with.some."strings".and."escape\nsequences\u263a"]
---tokens---
'[' Keyword
'table' Keyword
'.' Keyword
'header' Keyword
'.' Keyword
'with' Keyword
'.' Keyword
'some' Keyword
'.' Keyword
'"' Literal.String.Double
'strings' Literal.String.Double
'"' Literal.String.Double
'.' Keyword
'and' Keyword
'.' Keyword
'"' Literal.String.Double
'escape' Literal.String.Double
'\\n' Literal.String.Escape
'sequences' Literal.String.Double
'\\u263a' Literal.String.Escape
'"' Literal.String.Double
']' Keyword
'\n' Text.Whitespace