mirror of
https://github.com/laurent22/joplin.git
synced 2024-12-24 10:27:10 +02:00
Merge branch 'release-1.3' of github.com:laurent22/joplin into release-1.3
This commit is contained in:
commit
3847831d80
2
ElectronClient/package-lock.json
generated
2
ElectronClient/package-lock.json
generated
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "Joplin",
|
||||
"version": "1.3.10",
|
||||
"version": "1.3.11",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "Joplin",
|
||||
"version": "1.3.10",
|
||||
"version": "1.3.11",
|
||||
"description": "Joplin for Desktop",
|
||||
"main": "main.js",
|
||||
"scripts": {
|
||||
|
@ -352,7 +352,10 @@ export default class KeymapService extends BaseService {
|
||||
|
||||
public domToElectronAccelerator(event: KeyboardEvent<HTMLDivElement>) {
|
||||
const parts = [];
|
||||
const { key, ctrlKey, metaKey, altKey, shiftKey } = event;
|
||||
|
||||
// We use the "keyCode" and not "key" because the modifier keys
|
||||
// would change the "key" value. eg "Option+U" would give "º" as a key instead of "U"
|
||||
const { keyCode, ctrlKey, metaKey, altKey, shiftKey } = event;
|
||||
|
||||
// First, the modifiers
|
||||
if (ctrlKey) parts.push('Ctrl');
|
||||
@ -368,7 +371,7 @@ export default class KeymapService extends BaseService {
|
||||
}
|
||||
|
||||
// Finally, the key
|
||||
const electronKey = KeymapService.domToElectronKey(key);
|
||||
const electronKey = KeymapService.domToElectronKey(String.fromCharCode(keyCode));
|
||||
if (electronKey) parts.push(electronKey);
|
||||
|
||||
return parts.join('+');
|
||||
|
@ -10,12 +10,13 @@ const { execCommand, githubUsername } = require('./tool-utils.js');
|
||||
|
||||
// From https://stackoverflow.com/a/6234804/561309
|
||||
function escapeHtml(unsafe) {
|
||||
// We only escape <> as this is enough for Markdown
|
||||
return unsafe
|
||||
.replace(/&/g, '&')
|
||||
// .replace(/&/g, '&')
|
||||
.replace(/</g, '<')
|
||||
.replace(/>/g, '>')
|
||||
.replace(/"/g, '"')
|
||||
.replace(/'/g, ''');
|
||||
.replace(/>/g, '>');
|
||||
// .replace(/"/g, '"')
|
||||
// .replace(/'/g, ''');
|
||||
}
|
||||
|
||||
async function gitLog(sinceTag) {
|
||||
|
Loading…
Reference in New Issue
Block a user