<!doctype html>
<html>
  <head>
    <title>dir mo</title>
    <meta charset="utf-8"/>
  </head>
  <body>

    <!-- This checks prefix form in RTL mode. -->
    _<math dir="rtl"><mo style="margin-inline-start: 0em; margin-inline-end: 0.055555555555555em;" lspace="0em" rspace="0em">+</mo><mi>x</mi></math>_

    <br/>

    <!-- This checks leading and trailing spaces in RTL mode. -->
    _<math dir="rtl"><mi>x</mi><mo style="margin-inline-start: 1em; margin-inline-end: 2em;" lspace="0em" rspace="0em">+</mo><mi>y</mi></math>_

  </body>
</html>
