* src/bidi.c (bidi_resolve_brackets): Instead of requiring
prev_for_neutral's type to be known, fall back on SOS, per
the UBA.
else if (bidi_it->bracket_enclosed_type == STRONG_L /* N0c, N0d */
|| bidi_it->bracket_enclosed_type == STRONG_R)
{
- eassert (bidi_it->prev_for_neutral.type != UNKNOWN_BT);
- switch (bidi_it->prev_for_neutral.type)
+ bidi_type_t prev_type_for_neutral = bidi_it->prev_for_neutral.type;
+
+ if (prev_type_for_neutral == UNKNOWN_BT)
+ prev_type_for_neutral = embedding_type;
+ switch (prev_type_for_neutral)
{
case STRONG_R:
case WEAK_EN: