Plugin
FixCodeblockGap
Removes the gap between codeblocks and text below it
1
/*2
* FiveCord — a Discord client mod3
* Copyright (c) 2025 FiveCord4
* SPDX-License-Identifier: GPL-3.0-or-later5
*/6
7
import { Devs } from "@utils/constants";8
import definePlugin from "@utils/types";9
10
export default definePlugin({11
name: "FixCodeblockGap",12
description: "Removes the gap between codeblocks and text below it",13
tags: ["Appearance"],14
authors: [Devs.Grzesiek11],15
patches: [16
{17
find: String.raw`/^${"```"}(?:([a-z0-9_+\-.#]+?)\n)?\n*([^\n][^]*?)\n*${"```"}`,18
replacement: {19
match: String.raw`/^${"```"}(?:([a-z0-9_+\-.#]+?)\n)?\n*([^\n][^]*?)\n*${"```"}`,20
replace: "$&\\n?",21
},22
},23
],24
});25