Plugin

FixCodeblockGap

Removes the gap between codeblocks and text below it

Appearance
index.ts
Download

Source

src/plugins/fixCodeblockGap/index.ts
1/*
2 * FiveCord — a Discord client mod
3 * Copyright (c) 2025 FiveCord
4 * SPDX-License-Identifier: GPL-3.0-or-later
5 */
6
7import { Devs } from "@utils/constants";
8import definePlugin from "@utils/types";
9
10export 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