Skip to content

escaping within field separators #6

@rikeshi

Description

@rikeshi

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions