Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .claude/skills/post-review/scripts/post-audit.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ const note = (id, text) => findings[id].notes.push(text);
// ---------------------------------------------------------------- source pass
const plain = (s) =>
s
// A bilingual note's translation (<section data-alt-lang>) is not read in the same pass; same rule as reading.ts.
.replace(/<section\b[^>]*\bdata-alt-lang\b[^>]*>[\s\S]*?<\/section>/gi, ' ')
.replace(/<style[\s\S]*?<\/style>|<script[\s\S]*?<\/script>|<svg[\s\S]*?<\/svg>/gi, ' ')
.replace(/```[\s\S]*?```/g, ' ')
.replace(/<[^>]+>/g, ' ')
Expand Down
4 changes: 4 additions & 0 deletions public/_redirects
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
/rss.xml /feed.xml 301
/posts/kiln-automation-flow-en /posts/kiln-automation-flow/#en 301
/posts/kiln-automation-flow-en/ /posts/kiln-automation-flow/#en 301
/posts/kiln-orca-connector-en /posts/kiln-orca-connector/#en 301
/posts/kiln-orca-connector-en/ /posts/kiln-orca-connector/#en 301
173 changes: 0 additions & 173 deletions src/content/posts/kiln-automation-flow-en.md

This file was deleted.

141 changes: 139 additions & 2 deletions src/content/posts/kiln-automation-flow.md

Large diffs are not rendered by default.

148 changes: 0 additions & 148 deletions src/content/posts/kiln-orca-connector-en.md

This file was deleted.

114 changes: 113 additions & 1 deletion src/content/posts/kiln-orca-connector.md

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions src/utils/reading.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,17 @@
* a widget's script has many.
*/

/**
* A bilingual note marks the translation a reader switches to with
* `<section data-alt-lang>`. Only one language is read, so it is not counted.
*/
const ALT_LANG = /<section\b[^>]*\bdata-alt-lang\b[^>]*>[\s\S]*?<\/section>/gi;

/** The note's prose with markup, code, styles, scripts and data URIs removed. */
export function readableText(body: string): string {
return body
.replace(/^---\n[\s\S]*?\n---\n/, '')
.replace(ALT_LANG, ' ')
.replace(/<(style|script|svg|textarea)\b[\s\S]*?<\/\1>/gi, ' ')
.replace(/```[\s\S]*?```/g, ' ')
.replace(/<[^>]+>/g, ' ')
Expand Down
Loading