mirror of
https://github.com/storytold/deckcraft.git
synced 2026-10-29 04:56:58 -06:00
Merge pull request #1259
# Conflicts: # crates/engine/src/cmd/richclip.rs
This commit is contained in:
@@ -350,7 +350,7 @@ fn numeric_char(digits: &str) -> Option<char> {
|
||||
return None;
|
||||
}
|
||||
let n = u32::from_str_radix(body, radix).ok()?;
|
||||
char::from_u32(n).filter(|c| !c.is_control() || *c == '\n')
|
||||
char::from_u32(n).filter(|c| !c.is_control() || matches!(*c, '\n' | '\t'))
|
||||
}
|
||||
|
||||
/// Do the HTML's words and the paste's plain text say the same thing?
|
||||
@@ -383,6 +383,12 @@ mod tests {
|
||||
assert_eq!(decode_text("aAbA"), "aAbA");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn numeric_tab_entity_decodes_to_tab() {
|
||||
assert_eq!(decode_text("a	b"), "a\tb");
|
||||
assert_eq!(decode_text("a	b"), "a\tb");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn google_docs_normal_weight_wrapper_is_not_bold() {
|
||||
let html = "<meta charset=\"utf-8\"><b style=\"font-weight:normal;\" id=\"docs-internal-guid-1\"><span style=\"font-weight:400\">plain words</span></b>";
|
||||
|
||||
Reference in New Issue
Block a user