also hide markdown frames on mobile if the setting is enabled

This commit is contained in:
Ell 2022-04-13 22:34:16 +02:00
parent bd6c7b5901
commit 8199d7f67b

View file

@ -50,6 +50,10 @@ export default class CustomFramesPlugin extends Plugin {
e.createSpan({ text: `Couldn't find a frame with name ${frameName}` }); e.createSpan({ text: `Couldn't find a frame with name ${frameName}` });
return; return;
} }
if (Platform.isMobileApp && data.hideOnMobile) {
e.createSpan({ text: `${frameName} is hidden on mobile` });
return;
}
let styleMatch = /style:([^\n]+)/gi.exec(s); let styleMatch = /style:([^\n]+)/gi.exec(s);
let style = styleMatch && styleMatch[1].trim(); let style = styleMatch && styleMatch[1].trim();