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,16 +1,16 @@
// @flow
import Document from 'models/Document';
import Document from "models/Document";
export function homeUrl(): string {
return '/home';
return "/home";
}
export function starredUrl(): string {
return '/starred';
return "/starred";
}
export function newCollectionUrl(): string {
return '/collections/new';
return "/collections/new";
}
export function collectionUrl(collectionId: string, section: ?string): string {
@ -43,10 +43,10 @@ export function documentHistoryUrl(doc: Document, revisionId?: string): string {
*/
export function updateDocumentUrl(oldUrl: string, newUrl: string): string {
// Update url to match the current one
const urlParts = oldUrl.trim().split('/');
const urlParts = oldUrl.trim().split("/");
const actions = urlParts.slice(3);
if (actions[0]) {
return [newUrl, actions].join('/');
return [newUrl, actions].join("/");
}
return newUrl;
}
@ -65,7 +65,7 @@ export function newDocumentUrl(
}
export function searchUrl(query?: string, collectionId?: string): string {
let route = '/search';
let route = "/search";
if (query) route += `/${encodeURIComponent(query)}`;
if (collectionId) {
@ -75,10 +75,10 @@ export function searchUrl(query?: string, collectionId?: string): string {
}
export function notFoundUrl(): string {
return '/404';
return "/404";
}
export const matchDocumentSlug =
':documentSlug([0-9a-zA-Z-_~]*-[a-zA-z0-9]{10,15})';
":documentSlug([0-9a-zA-Z-_~]*-[a-zA-z0-9]{10,15})";
export const matchDocumentEdit = `/doc/${matchDocumentSlug}/edit`;