Skip to content

Commit 7c5908c

Browse files
committed
Update doc script
1 parent 70393ef commit 7c5908c

File tree

3 files changed

+19
-3
lines changed

3 files changed

+19
-3
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,10 @@ The rules with the following star :star: are included in the `plugin:regexp/reco
132132
<!--RULES_TABLE_END-->
133133
<!--RULES_SECTION_END-->
134134

135+
## :gear: Settings
136+
137+
See [Settings](https://ota-meshi.github.io/eslint-plugin-regexp/settings/).
138+
135139
<!--DOCS_IGNORE_START-->
136140

137141
<!-- ## :traffic_light: Semantic Versioning Policy

docs/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ This ESLint plugin provides linting rules relate to better ways to help you avoi
2020
- Enforces a consistent style of regular expressions.
2121
- Find hints for writing optimized regular expressions.
2222

23-
You can check on the [Online DEMO](./playground/).
23+
You can check on the [Online DEMO](./playground/README.md).
2424

2525
## :book: Usage
2626

tools/update-readme.ts

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,20 @@ fs.writeFileSync(
3535
)
3636
.replace(/<!--DOCS_IGNORE_START-->[\s\S]*?<!--DOCS_IGNORE_END-->/gu, "")
3737
.replace(
38-
/\(https:\/\/ota-meshi.github.io\/eslint-plugin-regexp/gu,
39-
"(.",
38+
/\(https:\/\/ota-meshi.github.io\/eslint-plugin-regexp(.*?)([^/]*\.html)?\)/gu,
39+
(_ptn, c1: string, c2: string) => {
40+
let result = `(.${c1}`
41+
if (c2) {
42+
result +=
43+
c2 === "index.html"
44+
? "README.md"
45+
: c2.replace(/\.html$/, ".md")
46+
} else {
47+
result += "README.md"
48+
}
49+
result += ")"
50+
return result
51+
},
4052
)
4153
.replace(/\n{3,}/gu, "\n\n"),
4254
)

0 commit comments

Comments
 (0)