The bold purple text below has a navy border around it. The border has a dashed "left" edge and a dotted "right" edge. The text given before each example is the UNICODE-convention version showing the logical order of the text in the test.

ltr: abc [def ABC] DEF

abc def אבג דהו

rtl: abc [def ABC] DEF

abc def אבג דהו

ltr: ABC [DEF abc] def

אבג דהו abc def

rtl: ABC [DEF abc] def

אבג דהו abc def