about summary refs log tree commit diff
path: root/compiler/rustc_errors/src
diff options
context:
space:
mode:
authorEsteban Kuber <esteban@kuber.com.ar>2021-09-09 15:01:43 +0000
committerEsteban Kuber <esteban@kuber.com.ar>2021-11-23 20:36:14 +0000
commita96fe02f6c5da9b903a658186255c5420537b9f8 (patch)
tree71273b8d95b7500420a4c298e088e7ba28629686 /compiler/rustc_errors/src
parent5a68abb0943e687cc6c8165376b4ed6deda17db3 (diff)
Replace ZWJ with nothing in terminal output
Diffstat (limited to 'compiler/rustc_errors/src')
-rw-r--r--compiler/rustc_errors/src/emitter.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/rustc_errors/src/emitter.rs b/compiler/rustc_errors/src/emitter.rs
index 6b79962ddd6..d44a216f234 100644
--- a/compiler/rustc_errors/src/emitter.rs
+++ b/compiler/rustc_errors/src/emitter.rs
@@ -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.