Skip to content

[DIT-13447] Introduce escape decoding on extractor level - #149

Merged
jholiga merged 2 commits into
masterfrom
joey/extractor-escapes-and-specifiers
Aug 13, 2026
Merged

[DIT-13447] Introduce escape decoding on extractor level#149
jholiga merged 2 commits into
masterfrom
joey/extractor-escapes-and-specifiers

Conversation

@jholiga

@jholiga jholiga commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Overview

Introduces handling specifically for escaped values like \n, \t, etc.

The root issue is that we encode the escape character to maintain the raw value, but never decode it when going to store it in Ditto. It's handled at the extractor level so that we can abide by certain per-language rules (for instance in kotlin a raw string """hello\nworld""", the \n would be intended to show.

Also addresses an issue found during testing for android xml specifically where tags were throwing off some of the parsing

Context

Screenshots

Test Plan

  • Unit cover most of the previously failing cases
  • A CLI yarn scan works as intended against https://github.com/dittowords/ditto-android-demo
    • If you can add some \n, \t, \\n etc to the code you're scanning that's a bonus, but I think the unit tests cover that logic pretty well.

@jholiga
jholiga merged commit f4d3144 into master Aug 13, 2026
1 check passed
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.

2 participants