Plugin

FixCodeblockGap

Removes the gap between codeblocks and text below it

Appearance
index.ts
Download

Source

src/plugins/fixCodeblockGap/index.ts
1import { Devs } from "@utils/constants";
2import definePlugin from "@utils/types";
3
4export default definePlugin({
5 name: "FixCodeblockGap",
6 description: "Removes the gap between codeblocks and text below it",
7 tags: ["Appearance"],
8 authors: [Devs.Grzesiek11],
9 patches: [
10 {
11 find: String.raw`/^${"```"}(?:([a-z0-9_+\-.#]+?)\n)?\n*([^\n][^]*?)\n*${"```"}`,
12 replacement: {
13 match: String.raw`/^${"```"}(?:([a-z0-9_+\-.#]+?)\n)?\n*([^\n][^]*?)\n*${"```"}`,
14 replace: "$&\\n?",
15 },
16 },
17 ],
18});
19