Skip to content

Add \xHH Unicode escape code to basic strings#202

Merged
hukkin merged 4 commits intomasterfrom
x-escape
Jan 10, 2026
Merged

Add \xHH Unicode escape code to basic strings#202
hukkin merged 4 commits intomasterfrom
x-escape

Conversation

@hukkin
Copy link
Owner

@hukkin hukkin commented Aug 5, 2022

Update tests and merge when toml-lang/toml#796 makes it into a TOML release.

@codecov-commenter
Copy link

codecov-commenter commented Aug 5, 2022

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (2a2aa62) to head (4068a18).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##            master      #202   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            4         4           
  Lines          528       530    +2     
  Branches        98        99    +1     
=========================================
+ Hits           528       530    +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@hukkin hukkin marked this pull request as ready for review December 21, 2025 10:51
Copy link

@StanFromIreland StanFromIreland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

gpshead pushed a commit to gpshead/tomli that referenced this pull request Dec 22, 2025
This adds new functions `loads_with_info()` and `load_with_info()` that
return a `ParseResult` containing:
- `data`: The parsed TOML data (same as before)
- `spec_version`: Minimum TOML spec version required ("1.0" or "1.1")
- `features`: Set of TOML 1.1 features used in the document

Currently detects the `\e` escape sequence (merged in PR hukkin#201) as a
TOML 1.1 feature. TODO comments mark where detection should be added
for pending TOML 1.1 features:
- `\xHH` hex escape (PR hukkin#202)
- Newlines/trailing commas in inline tables (PR hukkin#200)
- Optional seconds in datetime/time (PR hukkin#203)

The existing `loads()` and `load()` functions remain unchanged for
backward compatibility.

New public exports:
- `loads_with_info()`, `load_with_info()`: Parse with version info
- `ParseResult`: Frozen dataclass with parsing results
- `TOMLFeature`: Constants for TOML 1.1 feature identifiers

Addresses: hukkin#273
@hukkin hukkin merged commit 12314bd into master Jan 10, 2026
40 checks passed
@hukkin hukkin deleted the x-escape branch January 10, 2026 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants