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

preserve trailing word boundaries #1545

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Conversation

missinglink
Copy link
Member

this PR resolves the bug described in #1544

@missinglink missinglink marked this pull request as draft July 20, 2021 13:57
@missinglink
Copy link
Member Author

missinglink commented Jul 20, 2021

this issue appears to be more complex than I had hoped, it would take some more time to investigate:

  • whether clean.text is producing the correct value
  • whether _sanitizer/_tokinizer.js is marking all tokens as 'complete' when the text has extra chars at the end
  • whether the parser is receiving what it needs and returning the correct thing
  • what effect (if any) changes would have on /v1/search

@missinglink
Copy link
Member Author

note: there is already some code which is fairly similar looking but subtly different from the changes in this PR:

// when $subject is not the end of $clean.text
// then there must be tokens coming afterwards
else if (!clean.text.endsWith(text)) {
parserConsumedAllTokens = true;
}

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.

1 participant