Replace ZWJ with nothing in terminal output

This commit is contained in:
Esteban Kuber 2021-09-09 15:01:43 +00:00
parent 5a68abb094
commit a96fe02f6c
2 changed files with 3 additions and 2 deletions

View file

@ -2081,6 +2081,7 @@ fn num_decimal_digits(num: usize) -> usize {
// We replace some characters so the CLI output is always consistent and underlines aligned.
const OUTPUT_REPLACEMENTS: &[(char, &str)] = &[
('\t', " "), // We do our own tab replacement
('\u{200D}', ""), // Replace ZWJ with nothing for consistent terminal output of grapheme clusters.
('\u{202A}', ""), // The following unicode text flow control characters are inconsistently
('\u{202B}', ""), // supported accross CLIs and can cause confusion due to the bytes on disk
('\u{202D}', ""), // not corresponding to the visible source code, so we replace them always.

View file

@ -48,10 +48,10 @@ error: identifiers cannot contain emojis: `i_like_to_😅_a_lot`
LL | fn i_like_to_😅_a_lot() -> 👀 {
| ^^^^^^^^^^^^^^^^^^
error: identifiers cannot contain emojis: `ABig👩👩👧👧Family`
error: identifiers cannot contain emojis: `ABig👩👩👧👧Family`
--> $DIR/emoji-identifiers.rs:1:8
|
LL | struct ABig👩👩👧👧Family;
LL | struct ABig👩👩👧👧Family;
| ^^^^^^^^^^^^^^^^^^
error[E0599]: no function or associated item named `full_of✨` found for struct `👀` in the current scope