mirror of
https://github.com/facebook/docusaurus.git
synced 2025-07-24 12:07:58 +02:00
refactor: capitalize comments (#7188)
* refactor: capitalize comments * revert...
This commit is contained in:
parent
200009008b
commit
fa1ce230ea
99 changed files with 241 additions and 350 deletions
|
@ -21,8 +21,10 @@ const isWindows = () => process.platform === 'win32';
|
|||
export const isNameTooLong = (str: string): boolean =>
|
||||
// Not entirely correct: we can't assume FS from OS. But good enough?
|
||||
isMacOs() || isWindows()
|
||||
? str.length + SPACE_FOR_APPENDING > MAX_PATH_SEGMENT_CHARS // macOS (APFS) and Windows (NTFS) filename length limit (255 chars)
|
||||
: Buffer.from(str).length + SPACE_FOR_APPENDING > MAX_PATH_SEGMENT_BYTES; // Other (255 bytes)
|
||||
? // Windows (NTFS) and macOS (APFS) filename length limit (255 chars)
|
||||
str.length + SPACE_FOR_APPENDING > MAX_PATH_SEGMENT_CHARS
|
||||
: // Other (255 bytes)
|
||||
Buffer.from(str).length + SPACE_FOR_APPENDING > MAX_PATH_SEGMENT_BYTES;
|
||||
|
||||
export function shortName(str: string): string {
|
||||
if (isMacOs() || isWindows()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue