-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Indent code past the widest line number #26540
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
Conversation
Yay, thanks for finishing this for me! I started a summer job and got busy. Glad this is landing. |
@bors: r+ |
📌 Commit c5dfd34 has been approved by |
@oli-obk sorry, this slipped off my radar, test sounds fine |
dummy.txt:10 \n\ | ||
dummy.txt:11 \n\ | ||
dummy.txt:12 \n".as_bytes()); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@oli-obk this test is giving me trouble after making some changes to codemap, the output I get is
dummy.txt: 8 line8
dummy.txt: 9 line9
dummy.txt:10 line10
dummy.txt:11 e-lä-vän
dummy.txt:12 tolv
Which is what I expect from looking at the test. Why does the test not expect the content in vec?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because hilight_lines only prints the dummy.txt:line prefix, I couldn't figure out where the actual text gets appended
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I figured out what is going on here, new_line declares the start of a line, but the code here finds the end of a line. get_line is a weird function and goes not to the next registered line but to the next \n
, therefore, each line you get from the codemap is the zero length string from the end of the previous line. This is fixed in my PR.
closes #25037
closes #11715
r? @nrc