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

Add functionality to strip whitespace from annotations. #17

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

NickHilton
Copy link

Feature

Adds an option to the component so that if a user highlights some text with leading or trailing whitespace, that whitespace can be automatically stripped.

We noticed a lot of our annotations were being saved with leading/trailing whitespace accidentally so want the option in this component to adjust that.

Currently we can post process the annotations but this allows it to happen in the UI as well.

Changes

  • Add python argument strip_whitespace: bool = False to the main component, preserving current behaviour
  • Add typescript argument strip_whitespace to strip annotations after they have been selected in the UI and update the internal store of annotations to reflect that

Testing

  • Spun up local server and got desired behaviour with/without strip_whitespace turned on

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