1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-06-21 23:17:42 +02:00

All: Resolves : Set resource path to correct relative path so that for example images show up in Markdown viewers

This commit is contained in:
Laurent Cozic
2018-11-21 00:36:23 +00:00
parent 45cd8b7e3c
commit 897f53b13e
5 changed files with 80 additions and 26 deletions

@ -86,6 +86,15 @@ function friendlySafeFilename(e, maxLength = null) {
}
}
while (output.length) {
const c = output[0];
if (c === ' ') {
output = output.substr(1, output.length - 1);
} else {
break;
}
}
if (!output) return _('Untitled');
return output.substr(0, maxLength);