mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-20 11:37:52 +02:00
refactor: install eslint-plugin-regexp (#6906)
* refactor: install eslint-plugin-regexp * simplify * simplify * fix
This commit is contained in:
parent
127183e70e
commit
3a4b9b4c30
23 changed files with 145 additions and 83 deletions
|
@ -37,7 +37,7 @@ function processSection(section) {
|
|||
.trim()
|
||||
.replace('running_woman', 'running');
|
||||
|
||||
let authors = content.match(/## Committers: \d+.*/ms);
|
||||
let authors = content.match(/## Committers: \d.*/s);
|
||||
if (authors) {
|
||||
authors = authors[0]
|
||||
.match(/- .*/g)
|
||||
|
@ -105,7 +105,7 @@ async function ChangelogPlugin(context, options) {
|
|||
async loadContent() {
|
||||
const fileContent = await fs.readFile(changelogPath, 'utf-8');
|
||||
const sections = fileContent
|
||||
.split(/(?=\n## )/ms)
|
||||
.split(/(?=\n## )/)
|
||||
.map(processSection)
|
||||
.filter(Boolean);
|
||||
await Promise.all(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue