Skip to content

Commit f4b088f

Browse files
committed
UPDATE: final library to pattern fixes
1 parent 68a1ad9 commit f4b088f

File tree

5 files changed

+8
-9
lines changed

5 files changed

+8
-9
lines changed

TODO.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# To Do
22

3-
- [ ] library -> collection/pattern
43
- [ ] copy to clipboard for variations
54
- [ ] search.html
65
- [ ] test button for variations
@@ -11,7 +10,7 @@
1110
- [ ] notes for variations
1211
- [ ] tags for variations
1312
- [ ] post to RegexPlanet
14-
- [ ] JSON schema for library
13+
- [ ] JSON schema for patterns
1514
- [ ] CI for yaml validated via json schema
1615
- [ ] more regex in the catalog
1716
- [ ] post to places besides RXP

app/components/Footer.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export function Footer() {
1414
{link.label}
1515
</a>);
1616
if (index < links.length - 1) {
17-
initial.push(<span className="mx-1">|</span>);
17+
initial.push(<span className="mx-1" key="key{{index}}">|</span>);
1818
}
1919
}
2020
);

app/components/Patterns.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import * as fsPromises from "node:fs/promises";
22
import * as path from "node:path";
33
import * as yaml from "js-yaml";
44

5-
const LIBRARY_DIR = path.join(process.cwd(), "library");
5+
const PATTERN_DIR = path.join(process.cwd(), "patterns");
66

77
export type PatternEntry = {
88
title: string;
@@ -26,9 +26,9 @@ async function initialize() {
2626
if (all.length > 0) {
2727
return;
2828
}
29-
const fileNames = await fsPromises.readdir(LIBRARY_DIR);
29+
const fileNames = await fsPromises.readdir(PATTERN_DIR);
3030
for await (const fileName of fileNames) {
31-
const fullPath = path.join(LIBRARY_DIR, fileName);
31+
const fullPath = path.join(PATTERN_DIR, fileName);
3232
console.log(`filename=${fullPath}`);
3333

3434
const raw = await fsPromises.readFile(fullPath, "utf-8");

app/routes/patterns.$entry._index.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ export const loader = async ({
2121

2222
export const meta: MetaFunction = () => {
2323
return [
24-
{ title: "Library - Regex Zone" },
25-
{ name: "description", content: "A library of useful regular expressions" },
24+
{ title: "Patterns - Regex Zone" },
25+
{ name: "description", content: "A collection of useful regular expression patterns" },
2626
];
2727
};
2828

app/routes/patterns._index.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export default function Index() {
4646
<>
4747
<HeaderSearch />
4848
<Container>
49-
<h1 className="py-2">Pattern Library</h1>
49+
<h1 className="py-2">Patterns</h1>
5050
<Table className="table-striped table-hover">
5151
<thead>
5252
<tr>

0 commit comments

Comments
 (0)