mirror of
https://github.com/servo/servo.git
synced 2025-08-07 14:35:33 +01:00
Auto merge of #13914 - TooManyBees:13894-use-graphemes, r=emilio
13894 Use graphenes in text-emphasis-style <!-- Please describe your changes on the following line: --> Use `unicode_segmentation` crate to truncate strings on grapheme boundaries. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #13894 (github issue number if applicable). <!-- Either: --> - [x] There are tests for these changes <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13914) <!-- Reviewable:end -->
This commit is contained in:
commit
b4a882f81a
7 changed files with 32 additions and 1 deletions
|
@ -43,4 +43,8 @@ fn text_emphasis_style_longhand_should_parse_properly() {
|
|||
let unicode_string = parse_longhand!(text_emphasis_style, "\"\\25B2\"");
|
||||
let unicode_string_struct = SpecifiedValue::String("▲".to_string());
|
||||
assert_eq!(unicode_string, unicode_string_struct);
|
||||
|
||||
let devanagari_string = parse_longhand!(text_emphasis_style, "\"षि\"");
|
||||
let devanagari_string_struct = SpecifiedValue::String("षि".to_string());
|
||||
assert_eq!(devanagari_string, devanagari_string_struct);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue