-
Notifications
You must be signed in to change notification settings - Fork 302
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
text/unicod/bidi: implement API, remove panics
The bidi API splits strings with mixed left-to-right (ltr) and right-to-left (rtl) parts into substrings (segments). Each segment contains a substring, a direction of text flow (either ltr or rtl) and the start and end positions in the input. The paragraph validators do not panic, instead the newParagraph function returns an error message in case the input is invalid. Fixes golang/go#42356 Change-Id: I90cafc8fadb0cf6936dfb1ab373586017147d709 Reviewed-on: https://go-review.googlesource.com/c/text/+/267857 Trust: Ian Lance Taylor <iant@golang.org> Reviewed-by: Marcel van Lohuizen <mpvl@golang.org>
- Loading branch information
1 parent
4482a91
commit 967b8f6
Showing
4 changed files
with
584 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.