chore: Move to prettier standard double quotes (#1309)
This commit is contained in:
@ -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`;
|
||||
|
Reference in New Issue
Block a user