-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Special way to underline with empty spans #108
Comments
Hi @epage, I’m working on addressing this ticket and would appreciate your guidance. BackgroundAccording to your fix in #107, you added additional col annotation span allowing symbols of My understanding of the goal for this ticket is illustrated by the following example: asdf_
as_f
'd" belongs here
If this is the case, we would need to find a way to place the "highlight" either directly after or between characters, which is very different (I think) from the current implementation. Do you have any ideas on how we might achieve this? Or is my understanding for ticket incorrect? |
To recap,
This is a "needs design" type of issue; no decision is made about what this should look like. One idea I've toyed with for EOL is for us to render That is only one idea and that doesn't cover other cases of empty spans. @estebank any thoughts? |
One option is to do what we do in |
If I understand correctly, now # render \n or \r\n
This is a line of "code␍␊
^
# OR
# print a one-width underline
This is a line of "code_
^ And for EOF, we also have two options # render ∅
This is a line of "code∅
^
# OR
# print a one-width underline
This is a line of "code_
^ |
@chengr4 you can also have, for both of these:
|
Right, what I'm saying is that leaving as-is is a valid decision (although not necessarily ideal). I've found pointing at nothing also useful for suggestions like
so you might need the flexibility to support both substitutions and the current behavior, depending on whether you want to point at a hidden char or merely point at the point after some code (which can be right on a newline). |
The
toml
crate occasionally returns empty spans and #107 fixed it so we could render something but it might be useful to try to highlight the space between characters, rather than a character.The text was updated successfully, but these errors were encountered: