1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-03-29 21:21:15 +02:00

Merge branch 'master' of github.com:laurent22/joplin

This commit is contained in:
Laurent Cozic 2020-03-27 16:12:43 +00:00
commit c3360d6c48
8 changed files with 14 additions and 2 deletions
CliClient/tests
ElectronClient/gui
ReactNativeClient/lib

@ -38,4 +38,9 @@ describe('InteropService_Importer_Md: importLocalImages', function() {
expect(items.length).toBe(0);
expect(note.body).toContain('Unidentified vessel travelling at sub warp speed, bearing 235.7. Fluctuations in energy readings from it, Captain. All transporters off.');
});
it('should import linked image with special characters in name', async function() {
const note = await importer.importFile(`${__dirname}/md_to_md/sample-special-chars.md`, 'notebook');
const items = await Note.linkedItems(note.body);
expect(items.length).toBe(1);
});
});

@ -0,0 +1 @@
![link special chars](../support/photo-åäö.jpg)

Binary file not shown.

After

(image error) Size: 2.7 KiB

Binary file not shown.

After

(image error) Size: 2.7 KiB

@ -2023,6 +2023,7 @@ class NoteTextComponent extends React.Component {
backgroundColor: theme.backgroundColor,
border: '1px solid',
borderColor: theme.dividerColor,
overflow: 'hidden',
};
const toolbarStyle = {

@ -153,6 +153,8 @@ function themeStyle(theme) {
output.colorUrl = '#7B81FF';
output.colorBright = 'rgb(220,220,220)';
themeCache_[theme] = output;
return addExtraStyles(themeCache_[theme]);
}
@ -184,6 +186,8 @@ function themeStyle(theme) {
output.colorUrl = '#7B81FF';
output.colorBright = 'rgb(220,220,220)';
themeCache_[theme] = output;
return addExtraStyles(themeCache_[theme]);
}

@ -450,7 +450,7 @@ class ConfigScreenComponent extends BaseScreenComponent {
const profileExportPrompt = (
<View style={this.styles().settingContainer}>
<Text style={this.styles().settingText}>Path:</Text>
<TextInput style={{ marginRight: 20 }} onChange={(event) => this.setState({ profileExportPath: event.nativeEvent.text })} value={this.state.profileExportPath} placeholder="/path/to/sdcard"></TextInput>
<TextInput style={{ paddingRight: 20 }} onChange={(event) => this.setState({ profileExportPath: event.nativeEvent.text })} value={this.state.profileExportPath} placeholder="/path/to/sdcard"></TextInput>
<Button title="OK" onPress={this.exportProfileButtonPress2_}></Button>
</View>
);

@ -63,7 +63,8 @@ class InteropService_Importer_Md extends InteropService_Importer_Base {
async importLocalImages(filePath, md) {
let updated = md;
const imageLinks = unique(extractImageUrls(md));
await Promise.all(imageLinks.map(async (link) => {
await Promise.all(imageLinks.map(async (encodedLink) => {
const link = decodeURI(encodedLink);
const attachmentPath = filename(`${dirname(filePath)}/${link}`, true);
const pathWithExtension = `${attachmentPath}.${fileExtension(link)}`;
const stat = await shim.fsDriver().stat(pathWithExtension);