1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-06-27 23:28:38 +02:00

Desktop: Fixes #3903: Header links with special characters were no longer working

This commit is contained in:
Laurent Cozic
2020-10-16 22:55:48 +01:00
parent 3179117c62
commit 958e5a80b7
12 changed files with 137 additions and 38 deletions

View File

@ -5,7 +5,7 @@ import BasePluginRunner from 'lib/services/plugins/BasePluginRunner';
import BaseService from '../BaseService';
import shim from 'lib/shim';
const { filename, dirname } = require('lib/path-utils');
const nodeSlug = require('slug');
const uslug = require('uslug');
interface Plugins {
[key:string]: Plugin
@ -13,7 +13,7 @@ interface Plugins {
function makePluginId(source:string):string {
// https://www.npmjs.com/package/slug#options
return nodeSlug(source, nodeSlug.defaults.modes['rfc3986']).substr(0,32);
return uslug(source).substr(0,32);
}
export default class PluginService extends BaseService {