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

Text validation #92

Open
justinpombrio opened this issue Apr 5, 2024 · 0 comments
Open

Text validation #92

justinpombrio opened this issue Apr 5, 2024 · 0 comments
Labels

Comments

@justinpombrio
Copy link
Owner

justinpombrio commented Apr 5, 2024

E.g.: if you put q in a number, that edit should fail.

Approach:

  • Every texty construct has a validation regex.
  • PrettyDoc.node_style() highlights a texty node in red if its validation regex fails.
  • Exit text command fails with a message if the text is invalid, and reverts if repeated. The message can say something like "Text is invalid. Repeat exit text command to revert your changes."
  • Empty text is still special, and needs to survive a save/load cycle (though perhaps converting into a hole).
@justinpombrio justinpombrio changed the title Text validation and normalization Text validation May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant