MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / is_invisible_format

Function is_invisible_format

atomic-cli/src/agent_error.rs:268–289  ·  view source on GitHub ↗

Characters that can alter visual order or create invisible ambiguity while remaining legal Unicode. Keep ordinary non-ASCII text readable.

(ch: char)

Source from the content-addressed store, hash-verified

266/// Characters that can alter visual order or create invisible ambiguity while
267/// remaining legal Unicode. Keep ordinary non-ASCII text readable.
268fn is_invisible_format(ch: char) -> bool {
269 matches!(
270 ch,
271 '\u{00ad}'
272 | '\u{034f}'
273 | '\u{061c}'
274 | '\u{115f}'..='\u{1160}'
275 | '\u{17b4}'..='\u{17b5}'
276 | '\u{180b}'..='\u{180f}'
277 | '\u{200b}'..='\u{200f}'
278 | '\u{2028}'..='\u{202e}'
279 | '\u{2060}'..='\u{206f}'
280 | '\u{3164}'
281 | '\u{fe00}'..='\u{fe0f}'
282 | '\u{feff}'
283 | '\u{ffa0}'
284 | '\u{fff0}'..='\u{fffb}'
285 | '\u{1bca0}'..='\u{1bca3}'
286 | '\u{1d173}'..='\u{1d17a}'
287 | '\u{e0000}'..='\u{e0fff}'
288 )
289}
290
291/// Preserve the exact platform units of a non-UTF-8 argv entry.
292#[cfg(unix)]

Callers 1

emitFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected