mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-23 04:58:03 +02:00
chore: upgrade Prettier + regenerate lock file (#5611)
* Bump deps * Run prettier * Format docs * Minor refactor * Collapse objects * Fix type * Update lock file
This commit is contained in:
parent
4dbc458a22
commit
3f1f8255a2
70 changed files with 1534 additions and 1517 deletions
|
@ -10,7 +10,8 @@ import {NumberPrefixParser} from './types';
|
|||
// Best-effort to avoid parsing some patterns as number prefix
|
||||
const IgnoredPrefixPatterns = (function () {
|
||||
// ignore common date-like patterns: https://github.com/facebook/docusaurus/issues/4640
|
||||
const DateLikePrefixRegex = /^((\d{2}|\d{4})[-_.]\d{2}([-_.](\d{2}|\d{4}))?)(.*)$/;
|
||||
const DateLikePrefixRegex =
|
||||
/^((\d{2}|\d{4})[-_.]\d{2}([-_.](\d{2}|\d{4}))?)(.*)$/;
|
||||
|
||||
// ignore common versioning patterns: https://github.com/facebook/docusaurus/issues/4653
|
||||
// note: we could try to parse float numbers in filenames but that is probably not worth it
|
||||
|
@ -23,7 +24,8 @@ const IgnoredPrefixPatterns = (function () {
|
|||
);
|
||||
})();
|
||||
|
||||
const NumberPrefixRegex = /^(?<numberPrefix>\d+)(?<separator>\s*[-_.]+\s*)(?<suffix>.*)$/;
|
||||
const NumberPrefixRegex =
|
||||
/^(?<numberPrefix>\d+)(?<separator>\s*[-_.]+\s*)(?<suffix>.*)$/;
|
||||
|
||||
// 0-myDoc => {filename: myDoc, numberPrefix: 0}
|
||||
// 003 - myDoc => {filename: myDoc, numberPrefix: 3}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue