**List of steps to reproduce** (step by step, including full links if applicable):
* Go to https://en.wikipedia.org/w/index.php?title=Wikipedia:Sandbox&action=edit
* Replace input with:
```
'''T'''they ''said 'foo'''see me ''rollin''', bar.'''they hatin''''
test '''They ''said 'foo'''fo real, bar.''''''they see me ''rollin''', they hatin''''
'''T'''they ''said 'foo'''see me ''rollin''', bar.'''they hatin''''
```
* Press preview.
**What happens?**:
'//They// said 'foo**//'they see me// rollin**, bar.**they hatin'**
test **They** **//said 'foo'//fo real, **they see me //rollin//', bar.**they hatin'**
//'they see me// rollin**, they hatin'**
'//They// said 'foo**, bar.**
**What should have happened instead?**:
**They** **//said 'foo'//**they see me //rollin//', they hatin'**
fo real, bar.****they see me //rollin//', they hatin'**
test **They** **//said 'foo'//**they see me //rollin//', bar.**they hatin'**
**They** **//said 'foo'//Actually I'd expect "**they see me //rollin'//, they hatin'**" (italicized single quote in //rollin'//), bar.**but wikitext codes are ambiguous so who knows what was intended. (using HTML would be recommendable when that matters)