Brendan Zabarauskas
Brendan Zabarauskas
Yeah, I think annotate snippets should replace tab characters with a user configurable number of spaces, and take it into account when computing underlines. This is what I do in...
I do this using a custom writer in `codespan-reporting`: https://github.com/brendanzab/codespan/blob/a77e646944765dfb338185b0ba9504500afb7304/codespan-reporting/src/term/config.rs#L56-L84
Oh, and importantly I also measure the length of strings taking the tab width into account: https://github.com/brendanzab/codespan/blob/a77e646944765dfb338185b0ba9504500afb7304/codespan-reporting/src/term/config.rs#L35-L45
Here's the relevant tests (excuse the not-so-nice test setup!): https://github.com/brendanzab/codespan/blob/a77e646944765dfb338185b0ba9504500afb7304/codespan-reporting/tests/term.rs#L415-L542
> \t move next characters to the next tabulation column. so basically it's adds from 1 to 4 ascii characters, dependent on caret position off last tabulation column Oh wait,...
I just want to say I really appreciate the time being put into this! Would be exciting to converge on something nice.
> My next steps are to: > > - Verify that simple ASCII vs. rich-Unicode output works @zbraniecki Oooh, does that mean we'll be able to use box drawing characters...
One other thing that might be interesting to figure out, but may be beyond the scope of this issue, is how to integrate pretty printers and styled output in messages....
One of the reasons I have been hesitant to sign my name (as opposed to just a tweet) was the 'rant'y nature of the letter, and I think this is...
One thing I like about this version is that it makes it clearer that this is a preference issue. The problem with the existing letter is that it isn't clear...