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
Implement white-space property(pre) #1507
Conversation
Critic review: https://critic.hoppipolla.co.uk/r/562 This is an external review system which you may optionally use for the code review of your pull request. In order to help critic track your changes, please do not make in-place history rewrites (e.g. via |
|
@pcwalton r? |
I pointed out some nits and code duplication, but I think this is a sub-optimal solution. Creating line break boxes looks like it works, but really we should not create these fake boxes which are only used to signal the line breaks. Instead, I think Basically the idea is that the the When This seems like it makes the logic much simpler. Also, I think it's ok that we compute newline locations in the text transforming function, but I'm less sure about where we should actually break the text runs. I think what you're doing now is probably useful, since we know it will need to be broken in those spots in all |
@metajack, r? Thank you for your kind review~!! |
I modified comment(main/layout/inline.rs). |
In order to support line-break by new-line character, Fist, calculate new-line character's position.(fn flush_clump_to_list) Second, split box(which includes new-line character) and do line-break.(fn scan_for_lines)
In order to support line-break by new-line character, Fist, calculate new-line character's position.(fn flush_clump_to_list) Second, split box(which includes new-line character) and do line-break.(fn scan_for_lines)
In order to support line-break by new-line character, Fist, calculate new-line character's position.(fn flush_clump_to_list) Second, split box(which includes new-line character) and do line-break.(fn scan_for_lines)
In order to support line-break by new-line character, Fist, calculate new-line character's position.(fn flush_clump_to_list) Second, split box(which includes new-line character) and do line-break.(fn scan_for_lines)
In order to support line-break by new-line character, Fist, calculate new-line character's position.(fn flush_clump_to_list) Second, split box(which includes new-line character) and do line-break.(fn scan_for_lines)
In order to support line-break by new-line character, Fist, calculate new-line character's position.(fn flush_clump_to_list) Second, split box(which includes new-line character) and do line-break.(fn scan_for_lines)
In order to support line-break by new-line character,
Fist, calculate new-line character's position.(fn flush_clump_to_list)
Second, split box(which includes new-line character) and do line-break.(fn scan_for_lines)