You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-11-29 22:48:10 +02:00
All: Disabled Mermaid support for now
This commit is contained in:
@@ -198,7 +198,8 @@ class MdToHtml {
|
||||
this.rendererPlugins_['mermaid'] = new MdToHtml_Mermaid();
|
||||
}
|
||||
|
||||
return language in this.rendererPlugins_ ? this.rendererPlugins_[language] : null;
|
||||
const plugin = this.rendererPlugins_[language];
|
||||
return plugin && plugin.enabled() ? plugin : null;
|
||||
}
|
||||
|
||||
parseInlineCodeLanguage_(content) {
|
||||
|
||||
@@ -2,10 +2,12 @@ const { shim } = require('lib/shim');
|
||||
const katex = require('katex');
|
||||
const katexCss = require('lib/csstojs/katex.css.js');
|
||||
const Setting = require('lib/models/Setting');
|
||||
const MdToHtml_PluginBase = require('./MdToHtml_PluginBase');
|
||||
|
||||
class MdToHtml_Katex {
|
||||
class MdToHtml_Katex extends MdToHtml_PluginBase {
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
this.cache_ = {};
|
||||
this.assetsLoaded_ = false;
|
||||
|
||||
|
||||
@@ -1,6 +1,12 @@
|
||||
const { shim } = require('lib/shim');
|
||||
const MdToHtml_PluginBase = require('./MdToHtml_PluginBase');
|
||||
|
||||
class MdToHtml_Mermaid {
|
||||
class MdToHtml_Mermaid extends MdToHtml_PluginBase {
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
this.setEnabled(false);
|
||||
}
|
||||
|
||||
name() {
|
||||
return 'mermaid';
|
||||
|
||||
21
ReactNativeClient/lib/MdToHtml_PluginBase.js
Normal file
21
ReactNativeClient/lib/MdToHtml_PluginBase.js
Normal file
@@ -0,0 +1,21 @@
|
||||
class MdToHtml_PluginBase {
|
||||
|
||||
constructor() {
|
||||
this.enabled_ = true;
|
||||
}
|
||||
|
||||
setEnabled(v) {
|
||||
this.enabled_ = v;
|
||||
}
|
||||
|
||||
enabled() {
|
||||
return this.enabled_;
|
||||
}
|
||||
|
||||
disabled() {
|
||||
return !this.enabled();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
module.exports = MdToHtml_PluginBase;
|
||||
Reference in New Issue
Block a user