move_node_before (pp, explicits_list);
pp = &temp_link;
}
+ else if (this_type == FRIBIDI_TYPE_BS)
+ {
+ /* X8. All explicit directional embeddings and overrides are
+ completely terminated at the end of each paragraph. Paragraph
+ separators are not included in the embedding. */
+ break;
+ }
else
{
/* X6. For all types besides RLE, LRE, RLO, LRO, and PDF:
if (!FRIBIDI_IS_NEUTRAL (override))
RL_TYPE (pp) = override;
}
- /* X8. All explicit directional embeddings and overrides are
- completely terminated at the end of each paragraph. Paragraph
- separators are not included in the embedding. */
- /* This function is running on a single paragraph, so we can do
- X8 after all the input is processed. */
}
/* Implementing X8. It has no effect on a single paragraph! */
pp = merge_with_prev (pp);
else
RL_TYPE (pp) = prev_type;
+ if (prev_type == next_type && RL_LEVEL (pp) == RL_LEVEL (pp->next))
+ {
+ pp = merge_with_prev (pp->next);
+ }
continue; /* As we know the next condition cannot be true. */
}
last_strong = base_dir;
/* Resolving dependency of loops for rules W4 and W5, W5 may
- want to prevent W4 to take effect in the next turn, do this
+ want to prevent W4 to take effect in the next turn, do this
through "w4". */
w4 = true;
/* Resolving dependency of loops for rules W4 and W5 with W7,