You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-06-15 23:00:36 +02:00
All: Extract note renderer to separate package (WIP) (#2206)
* Started updating to use external renderer package * Added way to build renderer assets * Done mobile compatilibty * Upgrade joplin-renderer * Added joplin-renderer package
This commit is contained in:
@ -334,8 +334,14 @@ class Setting extends BaseModel {
|
||||
};
|
||||
},
|
||||
},
|
||||
'markdown.softbreaks': { value: false, type: Setting.TYPE_BOOL, section: 'plugins', public: true, appTypes: ['mobile', 'desktop'], label: () => _('Enable soft breaks') },
|
||||
'markdown.typographer': { value: false, type: Setting.TYPE_BOOL, section: 'plugins', public: true, appTypes: ['mobile', 'desktop'], label: () => _('Enable typographer support') },
|
||||
|
||||
// Deprecated - use markdown.plugin.*
|
||||
'markdown.softbreaks': { value: false, type: Setting.TYPE_BOOL, public: false, appTypes: ['mobile', 'desktop']},
|
||||
'markdown.typographer': { value: false, type: Setting.TYPE_BOOL, public: false, appTypes: ['mobile', 'desktop']},
|
||||
// Deprecated
|
||||
|
||||
'markdown.plugin.softbreaks': { value: false, type: Setting.TYPE_BOOL, section: 'plugins', public: true, appTypes: ['mobile', 'desktop'], label: () => _('Enable soft breaks') },
|
||||
'markdown.plugin.typographer': { value: false, type: Setting.TYPE_BOOL, section: 'plugins', public: true, appTypes: ['mobile', 'desktop'], label: () => _('Enable typographer support') },
|
||||
'markdown.plugin.katex': { value: true, type: Setting.TYPE_BOOL, section: 'plugins', public: true, appTypes: ['mobile', 'desktop'], label: () => _('Enable math expressions') },
|
||||
'markdown.plugin.mark': { value: true, type: Setting.TYPE_BOOL, section: 'plugins', public: true, appTypes: ['mobile', 'desktop'], label: () => _('Enable ==mark== syntax') },
|
||||
'markdown.plugin.footnote': { value: true, type: Setting.TYPE_BOOL, section: 'plugins', public: true, appTypes: ['mobile', 'desktop'], label: () => _('Enable footnotes') },
|
||||
@ -848,12 +854,14 @@ class Setting extends BaseModel {
|
||||
// { sync.5.path: 'http://example', sync.5.username: 'testing' }
|
||||
// and baseKey is 'sync.5', the function will return
|
||||
// { path: 'http://example', username: 'testing' }
|
||||
static subValues(baseKey, settings) {
|
||||
static subValues(baseKey, settings, options = null) {
|
||||
const includeBaseKeyInName = !!options && !!options.includeBaseKeyInName;
|
||||
|
||||
let output = {};
|
||||
for (let key in settings) {
|
||||
if (!settings.hasOwnProperty(key)) continue;
|
||||
if (key.indexOf(baseKey) === 0) {
|
||||
const subKey = key.substr(baseKey.length + 1);
|
||||
const subKey = includeBaseKeyInName ? key : key.substr(baseKey.length + 1);
|
||||
output[subKey] = settings[key];
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user