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: 1 addition & 1 deletion apps/web/app/og/docs/[...slug]/route.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const renderDocImage = async (

return new ImageResponse(
<div style={{ fontFamily: "Geist" }} tw="flex h-full w-full bg-black">
{/* oxlint-disable-next-line next/no-img-element */}
{/* oxlint-disable-next-line next/no-img-element -- ImageResponse renders through Satori, which cannot load next/image */}
<img
alt="Docker Doctor OpenGraph Background"
height={630}
Expand Down
11 changes: 6 additions & 5 deletions apps/web/lib/changelog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ export interface ChangelogData {

type Section = "minor" | "patch";

const CHANGE_LINE_RE = /^-\s+(?<sha>[a-f0-9]+):\s+(?<title>.+)/u;

// The section a `### ...` heading opens. Changes under any other heading are
// not collected.
const sectionOf = (line: string): Section | null => {
Expand Down Expand Up @@ -66,14 +68,13 @@ export const parseChangelog = (filePath: string): ChangelogData => {
currentSection = sectionOf(line);
currentChange = null;
} else if (line.startsWith("- ") && currentSection && currentVersion) {
// oxlint-disable-next-line prefer-named-capture-group
const shaMatch = /^-\s+([a-f0-9]+):\s+(.+)/u.exec(line);
const change = CHANGE_LINE_RE.exec(line)?.groups;

if (shaMatch) {
if (change) {
currentChange = {
details: [],
sha: shaMatch[1],
title: shaMatch[2],
sha: change.sha,
title: change.title,
};
currentVersion[currentSection].push(currentChange);
} else if (currentChange) {
Expand Down
Loading