Fix inconsistency between demo and displayed code for modal demo

Fixes #13991

Almost not worth a pull request... :)