Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

escaping within field separators #6

Open
rikeshi opened this issue Dec 22, 2023 · 0 comments
Open

escaping within field separators #6

rikeshi opened this issue Dec 22, 2023 · 0 comments

Comments

@rikeshi
Copy link

rikeshi commented Dec 22, 2023

CompleteSearch doesn't ignore escaped within-field-separator in fields with multiple items.

Explanation:

  • Assume two fields: subject and to.
  • Specify --within-field-separator=\| in the Makefile.
  • Specify --allow-multiple-items=to in the Makefile.

Using the following TSV input:

subject	to
The \| subject \| value	The \| to \| value

We get the following output from the server (parsed with jq):

{
  "to": [
    "The \\",
    " to \\",
    " value"
  ],
  "subject": "The \\| subject \\| value"
}

The escaped \| are preserved in the subject field. The escaped \| are ignored in the to field and each | is interpreted as a separator.

Is there another way to escape within-field separators? Otherwise it would be a useful addition.

Tested with Docker image https://hub.docker.com/layers/adfreiburg/completesearch/latest/images/sha256-bb8ca10e5dfb0ba433f8577e6220ad1cd6017e034b3c0ba84c68b0b6b8dae41b

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

No branches or pull requests

1 participant