Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix search value for html export path #2171

Merged
merged 2 commits into from
Aug 9, 2018

Conversation

yamash723
Copy link
Contributor

Fixed issue: #2159

The path generated by file-url begins with file:///.

file.replace('file://', '')  //    /C:/Users/........  wrong path.
file.replace('file:///', '') //    C:/Users/........   correct path.

@kazup01 kazup01 added the awaiting review ❇️ Pull request is awaiting a review. label Jul 3, 2018
@Rokt33r Rokt33r added awaiting changes 🖊️ Pull request has been reviewed, but contributor needs to make changes. and removed awaiting review ❇️ Pull request is awaiting a review. labels Jul 17, 2018
@@ -225,7 +225,7 @@ export default class MarkdownPreview extends React.Component {
const attachmentsAbsolutePaths = attachmentManagement.getAbsolutePathsOfAttachmentsInContent(noteContent, this.props.storagePath)

files.forEach((file) => {
file = file.replace('file://', '')
file = file.replace('file:///', '')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fix doesn't work on macOS. I think we have to check which os is used.

if (global.process.platform === 'win32') {
  file = file.replace('file:///', '')
} else {
  file = file.replace('file://', '')
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your review. I fixed it.

@kazup01 kazup01 added awaiting review ❇️ Pull request is awaiting a review. and removed awaiting changes 🖊️ Pull request has been reviewed, but contributor needs to make changes. labels Jul 31, 2018
@Rokt33r Rokt33r added next release (v0.11.9) and removed awaiting review ❇️ Pull request is awaiting a review. labels Aug 9, 2018
@Rokt33r Rokt33r merged commit c227a1f into BoostIO:master Aug 9, 2018
@yamash723 yamash723 deleted the fixbug-html-export branch August 10, 2018 03:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants