mirror of
https://github.com/laurent22/joplin.git
synced 2025-02-16 19:47:40 +02:00
Desktop, Mobile: Fixed note renderer asset caching issue
This commit is contained in:
parent
d02488f00c
commit
ea75f65e35
@ -103,11 +103,10 @@
|
||||
|
||||
const pluginAssetsContainer = document.getElementById('joplin-container-pluginAssetsContainer');
|
||||
|
||||
for (let name in assets) {
|
||||
if (pluginAssetsAdded_[name]) continue;
|
||||
pluginAssetsAdded_[name] = true;
|
||||
|
||||
const asset = assets[name];
|
||||
for (let i = 0; i < assets.length; i++) {
|
||||
const asset = assets[i];
|
||||
if (pluginAssetsAdded_[asset.name]) continue;
|
||||
pluginAssetsAdded_[asset.name] = true;
|
||||
|
||||
if (asset.mime === 'application/javascript') {
|
||||
const script = document.createElement('script');
|
||||
|
@ -1,4 +1,4 @@
|
||||
function addContextAssets(context) {
|
||||
function addContextAssets(context:any) {
|
||||
if ('mermaid' in context.pluginAssets) return;
|
||||
|
||||
context.pluginAssets['mermaid'] = [
|
||||
@ -12,6 +12,7 @@ function addContextAssets(context) {
|
||||
];
|
||||
}
|
||||
|
||||
// @ts-ignore: Keep the function signature as-is despite unusued arguments
|
||||
function installRule(markdownIt:any, mdOptions:any, ruleOptions:any, context:any) {
|
||||
const defaultRender:Function = markdownIt.renderer.rules.fence || function(tokens:any[], idx:number, options:any, env:any, self:any) {
|
||||
return self.renderToken(tokens, idx, options, env, self);
|
||||
|
Loading…
x
Reference in New Issue
Block a user