Closed mbrubeck closed 9 years ago
r? @pcwalton or @SimonSapin
Reviewed 1 of 1 files at r1. Review status: all files reviewed at latest revision, 1 unresolved discussion, all commit checks successful.
src/lib.rs, line 82 [r1] (raw file):
Is the level of the first paragraph always 0 if you give a Some(_)
value for the level
parameter of process_text
?
Comments from the review on Reviewable.io
@bors-servo r+
:pushpin: Commit deb6696 has been approved by SimonSapin
:hourglass: Testing commit deb6696 with merge 4dbc442...
:sunny: Test successful - travis
I thought this wasn't needed for Servo, since paragraphs in HTML are (normally) based on markup, so Servo can usually just process one paragraph at a time. However, for preformatted text, the bidi algorithm must handle multiple paragraphs in a single inline flow.
The important changes here are in
process_text
andinitial_scan
. Most of the other changes are just renaming variables and functions to make sense in a multi-paragraph world.process_text
no longer returns the max embedding level. This was intended for optimizations, but wasn't actually useful in Servo. An approach like #5 can provide a replacement for this optimization.