chore: Move to prettier standard double quotes (#1309)
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
// @flow
|
||||
import Document from 'models/Document';
|
||||
import DocumentsStore from 'stores/DocumentsStore';
|
||||
import parseTitle from 'shared/utils/parseTitle';
|
||||
import Document from "models/Document";
|
||||
import DocumentsStore from "stores/DocumentsStore";
|
||||
import parseTitle from "shared/utils/parseTitle";
|
||||
|
||||
type Options = {
|
||||
file: File,
|
||||
@ -25,14 +25,14 @@ const importFile = async ({
|
||||
|
||||
// If the first line of the imported file looks like a markdown heading
|
||||
// then we can use this as the document title
|
||||
if (text.trim().startsWith('# ')) {
|
||||
if (text.trim().startsWith("# ")) {
|
||||
const result = parseTitle(text);
|
||||
title = result.title;
|
||||
text = text.replace(`# ${title}\n`, '');
|
||||
text = text.replace(`# ${title}\n`, "");
|
||||
|
||||
// otherwise, just use the filename without the extension as our best guess
|
||||
} else {
|
||||
title = file.name.replace(/\.[^/.]+$/, '');
|
||||
title = file.name.replace(/\.[^/.]+$/, "");
|
||||
}
|
||||
|
||||
let document = new Document(
|
||||
|
Reference in New Issue
Block a user