v4: ESLint and deno fmt pass on the whole tree again — html.ts's attribute pattern escaped a "/" its character class doesn't need escaped (no-useless-escape), and a line of journalLayout.test.ts ran past the width.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -159,7 +159,7 @@ const TAG_RE =
|
||||
|
||||
/** Matches one attribute: unquoted, single- or double-quoted, or bare. */
|
||||
const ATTR_RE =
|
||||
/([^\s"'<>\/=]+)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'=<>`]+)))?/g;
|
||||
/([^\s"'<>/=]+)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'=<>`]+)))?/g;
|
||||
|
||||
function parseAttrs(source: string): Attrs {
|
||||
const attrs: Attrs = new Map();
|
||||
|
||||
@@ -66,7 +66,9 @@ describe("hasThumbnail / hasQuote", () => {
|
||||
expect(hasThumbnail(makeDump({ thumbnailMime: "image/webp" }))).toBe(true);
|
||||
expect(
|
||||
hasThumbnail(
|
||||
makeDump({ richContent: { type: "generic", url: "u", thumbnailUrl: "t" } }),
|
||||
makeDump({
|
||||
richContent: { type: "generic", url: "u", thumbnailUrl: "t" },
|
||||
}),
|
||||
),
|
||||
).toBe(true);
|
||||
expect(hasThumbnail(makeDump())).toBe(false);
|
||||
|
||||
Reference in New Issue
Block a user