Skip to content

Commit

Permalink
fix: match background-color and background when replacing hex codes
Browse files Browse the repository at this point in the history
  • Loading branch information
maxwiseman committed Mar 8, 2024
1 parent 75e23c9 commit b59eb3c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ export default async function Page({
`href="/classes/${params.classId}`,
)
.replaceAll(
/background-color: #(?<hex>[A-Fa-f0-9]{6})/g,
(matchedText) => `${matchedText}6b`,
/background(?:-color)?: #(?<hex>[A-Fa-f0-9]{6});/g,
(matchedText) => `${matchedText.replace(";", "")}6b;`,
) || "",
}}
/>
Expand Down

0 comments on commit b59eb3c

Please sign in to comment.