chore: Move to prettier standard double quotes (#1309)

This commit is contained in:
Tom Moor
2020-06-20 13:59:15 -07:00
committed by GitHub
parent 2a3b9e2104
commit f43deb7940
444 changed files with 5988 additions and 5977 deletions

View File

@ -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(