fix inline preview

ref to https://github.com/Codiad/Codiad/issues/312 and https://github.com/Codiad/Codiad/issues/311