Closed etaoins closed 5 years ago
Here's some examples of Rust's charset nervous tic:
The examples are from a build on this public Buildkite pipeline: https://buildkite.com/arret/arret/builds/374
@etaoins thanks for the PR - code's great - and thanks for updating the comments :)
@etaoins I'll push this out to BK later on today!
@keithpitt All fixed, thanks for the quick turnaround!
@etaoins yay! 🎉
Rust tools such as Cargo and
rustfmt
seem to like resetting the charset to US ASCII by usingESC(B
in the middle of a line. Currently this outputs a literal(B
in the rendered HTML which makes the output look broken.This simply discards the next character after any
ESC(
orESC)
. Initially I only discardedB
for US ASCII and let the other charsets through as their original escape sequence. However, the existing pattern in the code is to ignore any well-formed escape sequences even if their exact content isn't understood.