```
% pandoc -f markdown -t native
$ invalid opening inline math$

$
invalid opening inline math$

$invalid closing inline math $

$invalid closing inline math
$

$valid inline math$
^D
[ Para
    [ Str "$"
    , Space
    , Str "invalid"
    , Space
    , Str "opening"
    , Space
    , Str "inline"
    , Space
    , Str "math$"
    ]
, Para
    [ Str "$"
    , SoftBreak
    , Str "invalid"
    , Space
    , Str "opening"
    , Space
    , Str "inline"
    , Space
    , Str "math$"
    ]
, Para
    [ Str "$invalid"
    , Space
    , Str "closing"
    , Space
    , Str "inline"
    , Space
    , Str "math"
    , Space
    , Str "$"
    ]
, Para
    [ Str "$invalid"
    , Space
    , Str "closing"
    , Space
    , Str "inline"
    , Space
    , Str "math"
    , SoftBreak
    , Str "$"
    ]
, Para [ Math InlineMath "valid inline math" ]
]
```
