integrated-application-development / integrated-application-development/pasfmt

Line length calculation for non-ASCII input

Open
#127 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Rust
Stars
105
Forks
20
PR merge metrics
No merged PRs in 30d

Description

One of the things left unfinished in #109 was the topic of non-ASCII input in relation to line-length calculation.

The implementation merged uses the UTF-8 byte length to decide how long lines are, which doesn't reflect what how long lines are to humans. This will result in lines wrapping sooner than expected when the input is not ASCII.

We should decide whether we will continue using the byte length or switch to a more sophisticated (and expensive) length calculation like that defined by the Unicode standard and implemented in the [unicode-width](https://crates.io/crates/unicode-width) crate.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.